Automatic Page Fit To Any Imge Size OR Vice Varsa

My current photo editing software (Microsoft PhotoDRaw) has the ability to do this and wondering if I can achieve the same in CorelDraw X5 or PhotoPaint Pro X3.  I just reinstalled both and need to start using them since PhotoDraw only work up till Windows XP and I use Virtual Machine to run it.

Here you go.  If say I open a new project to any page size of my choice and import any image (any size) into the page.   Is there a way I can automatically fit the page to the image size in either CorelDraw X5or PhotoPaint X3?  That is, if my default page size is letter (8.5"x11") and I import an image that is 2.2"x5", can I automatically fit the default page to the fit the image at 2.2"x5"?  Really very handy too.  Can I also do the reverse image to paper size?  If I can do either, where do I go?

Thanks.

Parents
  • Hi.

    Try this macro. I tested in X6

     

    Sub itemsToPage()
        doPageAndItemSizing False
    End Sub
    Sub pageToItems()
        doPageAndItemSizing True
    End Sub
    Sub togglePageBorder()
        If ActiveDocument.Properties("PageBorder", 1) Then
            ActiveDocument.Properties("PageBorder", 1) = False
        Else
            ActiveDocument.Properties("PageBorder", 1) = True
        End If
            Application.FrameWork.Automation.Invoke "77f7f9eb-3e06-4899-9a8b-80d9e2aa68d3"
    End Sub
    Private Sub doPageAndItemSizing(bPgToItem As Boolean)
        Dim sr As ShapeRange
        Dim w#, h#
        Set sr = ActiveSelectionRange
        If sr.Count = 0 Then MsgBox "Make a selection. Exiting...", vbCritical, "GDG": Exit Sub
        If Not ActiveDocument.Properties("PageBorder", 1) Then
            ActiveDocument.Properties("PageBorder", 1) = True
            Application.FrameWork.Automation.Invoke "77f7f9eb-3e06-4899-9a8b-80d9e2aa68d3"
        End If
        If bPgToItem Then
            sr.GetSize w, h
            ActivePage.SetSize w, h
        Else
            ActivePage.GetSize w, h
            sr.SetSize w, h
        End If
        sr.SetPositionEx cdrBottomLeft, 0, 0
    End Sub

     

    ~John

Reply Children