marcstutt Newbie

Joined: 24 Aug 2006 Posts: 4
|
Posted: Sun Oct 15, 2006 4:16 am Post subject: Macro to Export Draw File with several pages to eps |
|
|
Hello,
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:
sub ExportPagesToPNG()
oDoc = ThisComponent
oDrawPages = oDoc.getDrawPages()
Dim numberOfPages as integer
numberOfPages = oDrawPages.getCount()
For i = 0 To numberOfPages -1
print i
oPage = oDrawPages.getByIndex(i)
print oPage.getName()
oPageSelection = ??????
oExportFilter = createUnoService( "com.sun.star.drawing.GraphicExportFilter" )
oExportFilter.setSourceDocument( oPageSelection )
cExportUrl = oDoc.getURL()
cExportUrl = Left( cExportUrl, Len(cExportUrl)-4 ) + "_" + i + ".png"
...
next i
end sub
How can I select everything on the page and assign it to the variable oPageSelection?
Best Regards
Marc |
|