VBA Access Image Size and Resize Pages

I am writting a program that allows us to load all our old files from our archives and exports them out as PDFs and text files to load into our SQL database so we can search everything.  I have files dating back to Corel 5 which dont open in Corel 2019 so I loaded Corel X5 on my computer as well.  I have several questions.

#1, is there any API call to get the version of the File

#2 is there a way to recurse through the pages of the document do a select all on that page and get the page size.

#3 once i have the page size I will want to change the document paper size to match so that when it exports it doesnt cut off.

Does anyone know of such a method or can you point me in the right direction.

Thanks

Robert

Parents
No Data
Reply
  • #1  I can’t say for sure, but I think not. But you can check result of Import function

    #2 you can use this code:

    Dim p As Page, w#, h#

    For Each p In ActiveDocument.Pages

          p.GetSize w, h  'get width and height

    Next p

    #3 you have two option: a) change page size and export all shapes within current page; b) you can select  shapes you need and export selected shapes only. To change paper size use: p.SetSize width, height, where p As page

Children
No Data