Macro or command that fits drawing to page NOT fitting page to drawing

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

Parents
  • 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

Reply Children
No Data