OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

How can I install my macro from C++?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
hfrank
General User
General User


Joined: 04 Jan 2004
Posts: 5

PostPosted: Tue Jan 06, 2004 12:34 am    Post subject: How can I install my macro from C++? Reply with quote

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
View user's profile Send private message
DannyB
Moderator
Moderator


Joined: 02 Apr 2003
Posts: 3991
Location: Lawrence, Kansas, USA

PostPosted: Tue Jan 06, 2004 10:29 am    Post subject: Reply with quote

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
View user's profile Send private message
hfrank
General User
General User


Joined: 04 Jan 2004
Posts: 5

PostPosted: Tue Jan 06, 2004 6:39 pm    Post subject: You are so sincerely Reply with quote

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
View user's profile Send private message
hfrank
General User
General User


Joined: 04 Jan 2004
Posts: 5

PostPosted: Tue Jan 06, 2004 7:30 pm    Post subject: more Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group