daudi Newbie

Joined: 13 May 2011 Posts: 1
|
Posted: Fri May 13, 2011 2:36 am Post subject: macro to export impress presentation with notes to PDF |
|
|
Hi,
I'm new to writing macros in openoffice and want to write one that exports a presentation with the notes pages. I've seen that I need to use ExportNotesPages but am having trouble getting it to work.
I've created my macro by recording one using writer and then changing it a bit for impress. Here's the code that I have:
| Code: | sub testPdfExport
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(3) as new com.sun.star.beans.PropertyValue
args1(0).Name = "URL"
args1(0).Value = "file:///home/daudi/test.pdf"
args1(1).Name = "FilterName"
args1(1).Value = "impress_pdf_Export"
args1(2).Name = "FilterData"
args1(2).Value = Array(Array("ExportNotesPages",0,true,com.sun.star.beans.PropertyState.DIRECT_VALUE))
args1(3).Name = "SelectionOnly"
args1(3).Value = false
dispatcher.executeDispatch(document, ".uno:ExportToPDF", "", 0, args1())
end sub |
It exports the presentation okay, but does not include the notes pages.
Any ideas?
Thanks. |
|