OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

macro to export impress presentation with notes to PDF

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
daudi
Newbie
Newbie


Joined: 13 May 2011
Posts: 1

PostPosted: Fri May 13, 2011 2:36 am    Post subject: macro to export impress presentation with notes to PDF Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group