[Solved] Silent macro installation

Creating a macro - Writing a Script - Using the API

[Solved] Silent macro installation

Postby keithvassallo » Thu Jan 31, 2008 10:30 am

Hello everybody,

I'm doing my thesis, a user migration tool from Windows to Linux. Part of the thesis involves getting a bunch of Office .doc files and converting them to odt. I have the macro which does this, and I even know how to invoke the macro invisibly, so a batch conversion of doc files is possible.

The issue I have is with installing the macro. Is there a way this can be done programmatically without having to instruct the user on how to open openoffice and install the macro manually?

Perhaps I can just copy the macro somewhere or invoke a silent macro installation from within OOO? FYI, the macro is this: http://www.xml.com/pub/a/2006/01/11/fro ... ffice.html

Would appreciate your help!
Last edited by keithvassallo on Thu Jan 31, 2008 12:00 pm, edited 1 time in total.
Posts: 2
Joined: Thu Jan 31, 2008 10:25 am

Re: Silent macro installation

Postby probe1 » Thu Jan 31, 2008 11:43 am

In this very moment I answered your question in oooforum

So, you are asking to install an extension for all users?

see: http://api.openoffice.org/docs/Develope ... ions.xhtml
When running unopkg in a windowless mode then the option “--shared” determines if an extension can be used by all users. For example:

[<OfficePath>/program] $ unopkg add --shared my_extension.oxt


DateTime2 extension: insert date, time or timestamp, formatted to your needs
User avatar
Posts: 277
Joined: Mon Oct 08, 2007 1:34 am
Location: Chonburi Thailand

Re: Silent macro installation

Postby keithvassallo » Thu Jan 31, 2008 12:00 pm

probe1 wrote:Does this answer your request?


The unopkg executable offers another way to start the Extension Manager. It supersedes the pkgchk executable which was used in OpenOffice.org 1.1.0 and older versions and which no longer works.

In contrast to the Extension Manager in OpenOffice.org unopkg can also manage shared extensions. For example:

Code: Select all   Expand viewCollapse view
[<OfficePath>/program] $ unopkg add --shared my_extension.oxt

installs my_extension.oxt for all users.

unopkg offers a windowless mode in which all interactions occurs through the console. This is the default. If unopkg is started with the subcommand “gui” then the Extension Manager dialog appears which is exactly the same as the one in OpenOffice.org.

That's exactly what I need to do, thank you!!
Posts: 2
Joined: Thu Jan 31, 2008 10:25 am

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests