Laurent Godard wrote:
> Hi juergen
> 
>> the reason is that ThisComponent.getCurrentController returns not the
>> controller of the expected document. You run the macro when opening the
>> document and at this time the ThisComponent is probably set ot something
>> else. It is always a little bit tricky with ThisComponent.getCurrentXXX
>> methods. It's better to iterate over all frame/controllers and check if
>> the name is whatever.odt to ensure that you work with the right document.
> 
> I've never had such problems with macro stored inside documents
> ThisComponent has been always pointing on the right one
when i remember correctly it works most often but it is not reliable.
but well maybe somebody of the framework can correct me if i am wrong.

> 
> Btw, what means the 23 third argument ?
> did you try this
it means searching all frames ...
file:///net/v20z-so5/export/home/js93811/software/staroffice8_sdk/docs/common/ref/com/sun/star/frame/FrameSearchFlag.html#ALL

Juergen

> 
> StarDesktop.loadComponentFromURL("private:factory/swriter", "_blank",23,
> args)
> 
> 
> Laurent
> 
> 

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

Reply via email to