Hallo,
i want to run a OO-Macro from a external Programm (LotusScript, similar to VBA). And i use the COM-Interface.
i Try with:
set dispatcher = createObject("com.sun.star.frame.DispatchHelper")
call dispatcher.executeDispatch(document, ".uno:RunMacro", "macroname", 0, Array())
but this doesn't work.
It's something wrong or exisis another way to run a macro?
Roalf
Running a macro with COM
Running a macro with COM
Last edited by Roalf on Mon Aug 30, 2010 2:55 pm, edited 1 time in total.
OpenOffice 3.1.1 on Windows 7 / Lotus Notes 8.5.1
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Running a macro with COM
Hi,
From the thread Using COM for OOo with different languages I have found threads
Lotus Notes Lotusscript and OpenOffice... (OLE Stuff)
OLE Classes in Open Office
Hope this helps.
From the thread Using COM for OOo with different languages I have found threads
Lotus Notes Lotusscript and OpenOffice... (OLE Stuff)
OLE Classes in Open Office
Hope this helps.
Bernard
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
Re: Running a macro with COM
Hello Berndard,
thanx for your Help, but i now the base technic about the COM UNO bridge as well. I've written some well running code to automate OO from Lotus. But now i have a particular problem. I have to start a macro und i don't now how in have to do this with the COM UNO bridge. (in OO-Basic its a simple "call macro").
If have try to found this in the OO-documentation but, these documentation overextended me a little bit in this case.
Roalf
thanx for your Help, but i now the base technic about the COM UNO bridge as well. I've written some well running code to automate OO from Lotus. But now i have a particular problem. I have to start a macro und i don't now how in have to do this with the COM UNO bridge. (in OO-Basic its a simple "call macro").
If have try to found this in the OO-documentation but, these documentation overextended me a little bit in this case.
Roalf
OpenOffice 3.1.1 on Windows 7 / Lotus Notes 8.5.1
-
- Volunteer
- Posts: 1160
- Joined: Mon Oct 08, 2007 1:26 am
- Location: France, Paris area
Re: Running a macro with COM
Hi,
You may download the VBx OOo tool for VBA and read the documents. You will find routines for calling macros. Do the equivalent in your language.
If your program loads a document containing macros, you have to load it with the option MacroExecutionMode set to a correct value.
It is preferable in my opinion to avoid calling a macro if you can do the equivalent through COM.
It did not sound like that from your code.Roalf wrote: i now the base technic about the COM UNO bridge as well. I've written some well running code to automate OO from Lotus.
You may download the VBx OOo tool for VBA and read the documents. You will find routines for calling macros. Do the equivalent in your language.
If your program loads a document containing macros, you have to load it with the option MacroExecutionMode set to a correct value.
It is preferable in my opinion to avoid calling a macro if you can do the equivalent through COM.
Bernard
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1
OpenOffice.org 1.1.5 / Apache OpenOffice 4.1.1 / LibreOffice 5.0.5
MS-Windows 7 Home SP1