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

Need help on dispatchhelper

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
Cosmic P
OOo Enthusiast
OOo Enthusiast


Joined: 23 Mar 2005
Posts: 186

PostPosted: Wed May 11, 2005 1:38 am    Post subject: Need help on dispatchhelper Reply with quote

I know how to insert a region into another document that I open by using a macro, but how do I replace one?

This is the code that I use:

Code:

dim document as object
dim dispatcher as object

NewDoc = loadComponentFromURL()
document =  NewDoc.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

dim args(3) as new com.sun.star.beans.PropertyValue
args(0) .Name = "RegionName"
args(0).Value = "MyInsertedRegion"
args(1).Name = "RegionHidden"
args(1).Value = false
args(2).Name = "RegionProtect"
args(2).Value = false
args(3).Name = "LinkName"
args(3).Value = "file:///"

dispatcher.executeDispatcher(document, ".uno:InsertSection", "", 0, args())

End Sub


so, how do I make the code replace an existing region?
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