Hi everyone,
I have seen a few macros that resize page to fit drawing.
I need the opposite.
I have a book in Corel, individual pages in .cdr files and I want to stretch the text in each page to fit the A4 page, possibly to a certain margin.
Is this possible?
BR
Christos
Christos,
Here is a litle code to get you started. It will loop through each page and set the shapes on that page to the size of the page height.
Sub SizeToPageHeight() Dim srShapesOnPage As ShapeRange, srGuides As ShapeRange Dim p As Page ActiveDocument.Unit = cdrMillimeter For Each p In ActiveDocument.Pages p.Activate Set srShapesOnPage = p.Shapes.All Set srGuides = ActivePage.FindShapes(Type:=cdrGuidelineShape) srShapesOnPage.RemoveRange srGuides srShapesOnPage.SetSize , p.SizeHeight srShapesOnPage.CenterX = p.CenterX srShapesOnPage.CenterY = p.CenterY Next p End Sub
Happy coding,
-Shelby
HI Shelby,
I am not sure if my request was clear as the Sub provided mixes everything up and makes all shapes overlap and tiny (fit goes up to 1500% to display the drawing.
I am attaching a sample page. It has several Paragraph frames and several other special characters (In case you are curious, it is byzantine music with greek lyrics in each line).
As you see there is a big margin inside the A4 page and I want something similar to Acrobat's "Fit" when printing, which stretches the content to fill the page.