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