Openoffice's macros
Posted: Thu Apr 15, 2010 4:12 pm
Hi all,
I want to call an openoffice macro from fwh .
I use the following commands:
But doesn't work .
Can anyone help me ?
Tanks,
Wzaf
I want to call an openoffice macro from fwh .
I use the following commands:
Code: Select all
oService := CreateObject( "com.sun.star.ServiceManager" )
oDesktop := oService:CreateInstance( "com.sun.star.frame.Desktop" )
aVet:={}
oDoc := oDesktop:LoadComponentFromURL( "file:///" + StrTran( myfilename , "\", "/" ) , "_blank", 0, aVet )
oDispatcher:= oService:CreateInstance( "com.sun.star.frame.DispatchHelper" )
oDispatcher:executeDispatch(oDoc:GetCurrentController():GetFrame(), ".uno:runmacro", "mymacro", 0, Array() )
...
Can anyone help me ?
Tanks,
Wzaf