| View previous topic :: View next topic |
| Author |
Message |
hfrank General User

Joined: 04 Jan 2004 Posts: 5
|
Posted: Tue Jan 06, 2004 12:34 am Post subject: How can I install my macro from C++? |
|
|
Hi, Could anyone tell me how I can install my Macro from C++ into the soffice?
So, I can run the Macro from the shell command later from C++ silently;
I created this Macro from the Soffice's Basic, and want to deliver it with my C++App.
I do like to install the Macro on the user's PC where ooo is running while the user install my App.
Any idea is appreciate.
Thx in advance. |
|
| Back to top |
|
 |
DannyB Moderator


Joined: 02 Apr 2003 Posts: 3991 Location: Lawrence, Kansas, USA
|
Posted: Tue Jan 06, 2004 10:29 am Post subject: |
|
|
The Developer's Guide seems to indicate (been awhile since I read it) that you can install both Basic code and Basic Dialog boxes using the "pkgchk" command line tool.
From within Basic code, you can manipulate the Basic libraries. But the services which implement the necessary interfaces, are available only to Basic programmers.
A possibly simpler approach for your end users is to distribute a document which contains Basic code that installs....
1. Your Basic code
2. Your Basic dialogs
3. Your Menu Commands (and icons) into the user interface
4. Your compiled C++ code
5. Registers new services into OOo's registry.
I know that 1, 2 and 3 are possible. I am confident that 4 is possible because of the mechanism I used in 3 to install icons onto my menu commands.
I believe that 5 is possible, but have not gotten that far yet. _________________ Want to make OOo Drawings like the colored flower design to the left? |
|
| Back to top |
|
 |
hfrank General User

Joined: 04 Jan 2004 Posts: 5
|
Posted: Tue Jan 06, 2004 6:39 pm Post subject: You are so sincerely |
|
|
DannyB, thank you very much, You are always to answer our questions in time.
and, your answers are so precise .
However, I checked the "pkgchk" command in the programming Guide. It seems that the pkgchk is used to register the C++ components into the ooo.
My case is:
I have a VC application that uses the Star Office interface. Rather than coding things such as "Search Replace", "Printing", and "Complex Text Extraction" in VC, I use Star Basic Macros. To distribute the macros to users I create macro libraries (script.xlb, appmacro.xba). The library is placed where my VC applications are installed. The library must be registered and loaded before it is usable. I can then call these macros from Visual Basic using the Shell command.
Shell "D:\StarOffice6.0\program\soffice.exe macro:///Standard.Module1.MAIN(""Hello world"")", vbNormalFocus.
Could you give me some advices about it?
Thanks a million.
Frank |
|
| Back to top |
|
 |
hfrank General User

Joined: 04 Jan 2004 Posts: 5
|
Posted: Tue Jan 06, 2004 7:30 pm Post subject: more |
|
|
I would like to state my question more clearly as following:
I have a VC Application that uses the star office as file format converter. In order to convert the MS Office files into StarOffice files, I wrote a Macro and run the Macro using the shell command in a silent manner. To distribute the macros to users I create macro libraries(script.xlb, appmacro.xba). The library is placed where My VC application was installed. The library must be registered and loaded before it is usable.
Now, My question is: how can I register the library into the user's Star Office when they installed my VC application. In fact, I want to make it automatic without the user's intervention.
Could you help me?
Thank you very much in advance.
Frank |
|
| Back to top |
|
 |
|