Cosmic P OOo Enthusiast

Joined: 23 Mar 2005 Posts: 186
|
Posted: Wed May 11, 2005 1:38 am Post subject: Need help on dispatchhelper |
|
|
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? |
|