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.
Anyone have any idea how to reduce 4mm of object size from page size group and center entire things on the page?
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.
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
select range you want to stretch and run macro
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
you can complete your task with 2 macrosjohn's item to pagehttps://community.coreldraw.com/talk/coreldraw_graphics_suite_x5/f/coreldraw-graphics-suite-x5/37805/automatic-page-fit-to-any-imge-size-or-vice-varsa/178486#178486mek's above mentioned macroitem to page with make your design size as the page and meks code will help you to reduce the size 4mm.