I want my selection to reduce 4 mm from page size. for example my page size is 100*100mm and my design is 99*99mm or 150*150mm. I want my selection to reduce 4mm and after reducing it automatically become 96*96mm and then group everything on the current page and also place center on the page.
Charlie,
The purpose of this forum is to help those that are trying to write their own VBA / .NET Code when they get stuck, or share ideas on how to make their code better.
If you just want someone to write VBA code for you, I would suggest the general forums are a more appropriate place to ask. You can also ask for custom coding over at MacroMonster: Custom Coding – macromonster.com
And of course, you are welcome to write your small amount of VBA code here and we will be happy to help you build and improve upon it.
-Shelby
i know how to reduce the size of the selection, group everything in the selection and centerbut i dont know how to take the value of page and add or minus whatever the value of the object according to the page and then make exactly 4mm less from page size.i am learner so dont know much about all these things currentlySet sr = ActiveSelectionRangesr.GetBoundingBox x, y, w, hfx = 1 - 4 / wfy = 1 - 4 / hthats why i need a little help
It looks you have used part of code from here
https://community.coreldraw.com/talk/technical_graphics_products/f/coreldraw-technical-suite-x6/64068/macro-to-shift-the-selection-to-guideline
select range you want to stretch and run macro
Sub stretch() Dim sr As ShapeRange, fx#, fy#, px#, py#, pw#, ph#
ActiveDocument.Unit = cdrMillimeterActiveDocument.ReferencePoint = cdrCenterSet sr = ActiveSelectionRangeActivepage.GetBoundingBox px, py, pw, phfx = 1 - 4 / pwfy = 1 - 4 / phsr.stretch fx, fy, TrueEnd Sub