* Jürgen Schmidt <[EMAIL PROTECTED]> [180705, 09:46]:
> Hi,
> 
> Ennio-Sr wrote:
> [skip]
> 
> it looks that your macros should run in the global application context 
> and not in the context of a single document.
> I would create a globally available Basic library containing all my 
> macros. For the menu entries i would create add-on specific 
> configuration files (*.xcu) where you can specify the context where your 
> menu entry should appear (for example in the context of the writer 
> application only) and which macros should be called. For more details of 
> add-ons see the Developers Guide or the examples on 
> framework.openoffice.org.
> You can put your Basic library and the xcu files in a UNO package and 
> can deploy this package easily in several office installations if you want.
> These macros are also available from within documents and you don't have 
> to load a specific document.
> Maybe i have misunderstood you but this approach looks more straight 
> forward to me then the hassle with macros in a document which should be 
> global.
> 
> Juergen
> 

Hi Juergen,
thanks for your message: I'll have to reconsider what I did at the light
of the hints you gave. I've not 'consciously' met .xcu files or set up a UNO
package, so I need some further reading to understand how they work ...

My bewilderness (driven by ignorance of the fundamentals behind
appearance) is still there, however, about how is it possibile that
you get the impression you've opened a file (with all that is attached
to it, including  macros) whereas you get a different environment. In
other words, having used (in the macro) the service/command(?):

-  StarDesktop.loadComponentFromUrl(sUrl, "_blank", 0, Array() )

where sUrl was initialized to contain path and file name, I thought what
appeared on the screen was my file with all its attributes!

Conclusion: surely I do need much further reading (and I'll do that after
a few weeks holiday), perhaps, however, somewhere should it be made clear
that 'What You See Is NOT What You Get' :-)

Best regards,
        Ennio.
-- 
[Perche' usare Win$ozz (dico io) se ..."anche uno sciocco sa farlo.   \\?//
 Fa' qualche cosa di cui non sei capace!"  (diceva Henry Miller) ]    (°|°)
[Why use Win$ozz (I say) if ... "even a fool can do that.              )=(
 Do something you aren't good at!" (as Henry Miller used to say) ]

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

Reply via email to