Dear Joachim,

thanks for your answer.

I assume you mean I should specify l_objProperty as parameter
and not l_objProperty[1].

I've tried this already and this doesn't change anything.

Henrik

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 09, 2006 4:31 PM
> To: [email protected]
> Subject: Re: [dev] executeDispatch and PowerBuilder 10
> 
> Andersson Henrik wrote:
> > Hi all,
> > 
> > I need to write a program in PowerBuilder 10 to automate Calc and
> > Writer.
> > Writer was working without problem since I didn't have to use the
> > executeDispatch function.
> > 
> > Does someone have information about how to call this function from
> > PowerBuilder.
> > My application keeps terminating as soon as I'm calling 
> this function 
> > (Error calling external object function executedispatch ....)
> 
> XDispatchHelper::executeDispatch requires as last parameter a 
> sequence 
> of PropertyValue s:
> http://api.openoffice.org/docs/common/ref/com/sun/star/frame/X
> DispatchHelper.html#executeDispatch
> 
> You seem to pass the PropertyValue directly.
> 
> Joachim
> > 
> > Attached find my code.
> > 
> > Thanks in advance for your help.
> > Henrik
> > 
> > -------------
> > long ll_Ret
> > string ls_FileName
> > string args[]
> > 
> > oleobject           l_objServiceManager
> > oleobject           l_objDesktop
> > oleobject           l_objDispatcher
> > oleobject           l_objCoreReflection
> > 
> > oleobject           l_objDocument
> > 
> > oleobject           l_objProperty[]
> > oleobject           l_objPropertyClass
> > 
> > l_objServiceManager = create oleobject
> > 
> > ll_Ret =
> > 
> l_objServiceManager.ConnectToNewObject("com.sun.star.ServiceManager")
> > if ll_Ret <> 0 then
> >     MessageBox ( '', 'leider nein' )
> >     return
> > end if
> > 
> > l_objDesktop =
> > l_objServiceManager.createInstance("com.sun.star.frame.Desktop")
> > l_objDispatcher =
> > 
> l_objServiceManager.createInstance("com.sun.star.frame.Dispatc
> hHelper")
> > 
> > l_objCoreReflection =
> > 
> l_objServiceManager.createInstance("com.sun.star.reflection.Co
> reReflecti
> > on")
> > 
> > ls_FileName = uf_ConvertToUrl("c:\temp\calc1.ods")
> > 
> > l_objDocument = 
> l_objDesktop.loadComponentFromURL(ls_Filename, "_blank",
> > 0, args)
> > 
> > l_objPropertyClass =
> > l_objCoreReflection.forName("com.sun.star.beans.PropertyValue")
> > l_objPropertyClass.createObject(REF l_objProperty[1])
> > l_objProperty[1].Name = "Nr"
> > l_objProperty[1].Value = "2"
> > 
> > -- Until here everything works fine!!!
> > 
> > l_objDispatcher.executeDispatch(l_objDocument, 
> ".uno:JumpToTable", "",
> > 0, l_objProperty[1])
> > -------------
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to