but here openoffice is already started, I don't need to start it again.

and since this klient will run on perheps more then thousand computers,
I don't want to hardcode any path to the soffice binary.


Gerrit Jasper wrote:
> Christian Andersson wrote:
>> Hi there, I'm trying to integrate openoffice (2.0.3) into an web-based
>> application (that today is using word)
>> but I have now come up against a small problem.
>>
>> I need to call a macro inside an writer document from a visual basic
>> script that is running inside internet explorer.
>>
>> I have no problem opening the writer document from the visual basic
>> script, I can also manipulate the document from the script, but after
>> all of this is done I need to call a macro inside the document. but
>> sofar I have not come up with a sollution.
> 
> Christian,
> 
> 1.    From a bash script (Linux of course) I call the macro
> "shellToScalc" in the module
> "import" in a spreadsheet file "tables" (already opened, as you have) as
> follows:
> 
> sArg="dosomething"                                                   
>           /usr/gerrit/OOo/program/soffice
> "macro://tables/Standard.import.shellToScalc($sArg)"
> 
> 2.    If the macro doesn't expect an argument you can simply call it
> like this:
> 
> /usr/gerrit/OOo/program/soffice
> "macro://tables/Standard.import.shellToScalc"
> 
> (From a hint given by Mathias Bauer on this list years ago.)
> 
> 3.    I don't know anything about Windows and VB, but I suppose
> something like this must
> be possible there too. (Is Micro$oft's scripting effort "monad" (msh)
> worth anything?)
> 
> 4.    When working from an OpenOffice.org macro the "shell" command
> comes in handy.
> Getting the argument in takes some editing in sString:
> 
> sArg = "dosomething"
> sString = "/usr/gerrit/OOo/program/soffice
> 'macro://tables/Standard.import.shellToScalc(" & sArg & ")' "          
> shell(  sString )
> 
> 5.   When no argument is needed it also works like this:
> 
> shell( "/usr/gerrit/OOo/program/soffice
> 'macro://tables/Standard.import.shellToScalc' " )
> 
> 
> 6.   If this works in OOo calc I suppose it will also do in writer; may
> need some fiddling.
> I hope this helps,
> 
> Sincerely,
> Gerrit Jasper
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
Christian Andersson - [EMAIL PROTECTED]

Configuration and Collaboration for OpenOffice.org
Open Framework Systems AS http://www.ofs.no

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

Reply via email to