Joined: 24 Aug 2006
|Posted: Sun Oct 15, 2006 4:16 am Post subject: Macro to Export Draw File with several pages to eps
I'm rather new to macro programming, nevertheless I'm trying to write a macro, which exports each page of a draw document to eps/png/... file.
I have started with the following code:
oDoc = ThisComponent
oDrawPages = oDoc.getDrawPages()
Dim numberOfPages as integer
numberOfPages = oDrawPages.getCount()
For i = 0 To numberOfPages -1
oPage = oDrawPages.getByIndex(i)
oPageSelection = ??????
oExportFilter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
oExportFilter.setSourceDocument( oPageSelection )
cExportUrl = oDoc.getURL()
cExportUrl = Left( cExportUrl, Len(cExportUrl)-4 ) + "_" + i + ".png"
How can I select everything on the page and assign it to the variable oPageSelection?