|
"Richard" <lesricains@PleaseNoSpam.gmail.com> wrote in message <h4ush1$lbq$1@fred.mathworks.com>...
> Thanks Yair,
>
> You're right--I was wondering why the error message was a little different then last time I tried. Thanks for catching that. So with the corrected code:
>
> objServiceManager = actxserver('com.sun.star.ServiceManager')
> objDesktop=invoke(objServiceManager,'createInstance','com.sun.star.frame.Desktop')
> objDocument=invoke(objDesktop,'loadComponentFromURL','private:factor/swriter','_blank',0,[])
>
> I actually get the following error:
> ??? Error: Type mismatch, argument 1
>
> I don't know if it doesn't like the empty argument or which one.
>
>
>
> "Yair Altman" <altmanyDEL@gmailDEL.comDEL> wrote in message <h4u5m6$nag$1@fred.mathworks.com>...
> > "Richard" <lesricains@PleaseNoSpam.gmail.com> wrote in message
> > <snip>
> > > objDocument = invoke(objDesktop,'private:factor/swriter','_blank',0,[])
> > >
> > > The last line causes an error that's says
> > > ??? Invoke Error: Unknown name or named argument
> > ...
> > > Set objDocument= objDesktop.loadComponentFromURL("private:factory/swriter",_
> > > "_blank", 0, args)
> >
> >
> > If you'll look closely you'll see that you tried to invoke the first argument as the function name, which of course results in an error. Instead:
> >
> > objDocument = invoke(objDesktop, 'loadComponentFromURL', 'private:factor/swriter','_blank',0,[])
> >
> > Yair Altman
> > http://UndocumentedMatlab.com
> >
Hi Richard,
You might try using '' (ie an empty string) instead of [] for the empty args argument.
Good Luck,
Donn
|