Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have an OpenOfice macro that I want to use to process the contents of an OpenOffice file. I am able to do this by opening the file with OpenOffice and then running the macro. How do I invoke the macro from the Linux command line without using the GUI? Something like:

$ oowriter -headless -o MyDocument.odt -RUNMACRO MyLittleMacro 
share|improve this question

migrated from superuser.com Feb 12 '11 at 19:42

This question came from our site for computer enthusiasts and power users.

    
What about running a macro from a specific file? What would be the path to be used for invoking the macro in such a case? –  anoopjohn Dec 25 '12 at 17:58
add comment

2 Answers 2

Create an event-driven macro assigned to the Open Document event for a particular document or a common document. Then you would load the document by itself to act on itself or load it along with other documents to act on one or more of them. This is along the lines of the idea of an auto-run macro.

share|improve this answer
1  
So, wht would the command line be to invoke an event-driven macro assigned to a common document to apply it to the document MyDocument.odt? –  C.W.Holeman II May 19 '10 at 5:31
add comment

The flag you want is -invisible. See this example, adapted from http://ubuntuforums.org/showthread.php?t=786697

ooffice -invisible macro:///Standard.Module1.SaveAsXHTML("/tmp/somefile.rtf")
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.