How to export single page as PDF

Hi all,

I have a simple macro to export a page as PDF:

Dim filepath As String
filepath = ActiveDocument.filepath & "Planung.pdf"
ActiveDocument.Export filepath, cdrPDF, cdrCurrentPage

I use the same code for jpg Export (only difference is export options to handle image size etc) which works fine there.

But with PDF I have two problems:

1. All pages get exported into a one PDF File, despite stating to export only the current page

2. I get an error: Runtime error '-2147467259 (80004005)': Method 'Export' of object 'IVGDocument' failed

But as I said, the PDF is being created. It also contains every shape.

Does somebody know what these behaviours are caused by?

Parents
No Data
Reply Children
No Data