Daniel Beck wrote:
Hello ,


* I'm using Java, to access openOffice 2 UNO component. I'm trying to add items to the contextMenu inside OpenOffice - I used the example from sdk for that.

*Then the user choses the Item "Search Word" from the contextMenu, I want my own function to be called. The problem is : I don't know how to do that. As I understand it, I have to use xMenuEntry.setPropertyValue("CommandURL", String). But which String to pass? Do I have to make an UNO component to call my own function from OpenOffice?


Hi Daniel,

If you want to call your own function you can:

1. Write a Basic macro and provide the Basic function URL, something like: "macro:///Standard.Module1.Main". You can find more information about Basic and Basic macro URLs in the Developer's Guide.

2. Write your own component and implement a protocol handler. You can provide the command URL of your protocol handler. Something like: "myProtocol:myFunction" You can find more information about protocol handler in the Developer's Guide.

Regards,
Carsten

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

Reply via email to