Welcome beginner. Please answer all of the questions below which may provide information necessary to answer your question.
-----------------------------------------------------------------------------------------------------------
Which version of OpenOffice.org are you using? 2.3.1
What Operating System (version) are you using? windows XP SP2
What is your question or comment? Is there any way to pass an argument to calc, in order to get it from a vba macro. It could be done thru a shortcut in which one adds the argument to the command line (ie. the same way that you add the "-logo" argument)
Passing arguments to calc
- gvanderschooten
- Posts: 15
- Joined: Sun Apr 20, 2008 6:45 pm
- Location: France
Re: passing arguments to calc
gvanderschooten, sorry for the late reply but I am just sweeping through the unanswered posts. Have you worked out what you need to do here are do you still need help? In terms of using VBA to an OOo document you basically have two options:
- The first is write your own macro in OOoBasic and let's say that you call this ProcessSheet and you put it in YourLibrary.Module1 then you start Soffice with the macro parameter "macro:///~YourLibrary.Module1.ProcessSheet(arg1, arg2, ...)". I use the Windows Scripting Host OCX as a reference simply because I find that the wshShell method Run gives me finer control here.
- The second approach is to use COM automation bridge to talk to OOo directly just as you would talk to Word from an Excel app. Google the OPenOffice wiki to learn more.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
- gvanderschooten
- Posts: 15
- Joined: Sun Apr 20, 2008 6:45 pm
- Location: France
Re: passing arguments to calc
Sorry..I was also very busy with other problems!
many thanks for your help. I'll resume working on that in August and will let you know about my "success".
G.Vanderschooten
many thanks for your help. I'll resume working on that in August and will let you know about my "success".
G.Vanderschooten
- gvanderschooten
- Posts: 15
- Joined: Sun Apr 20, 2008 6:45 pm
- Location: France
Re: passing arguments to calc
Solution 1 works fine for me. Thanks for your help.
Anyway, it could have been easier to have a "-parameter(arg1,arg,..)" argument with OOffice!But 'c'est la vie'
Anyway, it could have been easier to have a "-parameter(arg1,arg,..)" argument with OOffice!But 'c'est la vie'
Re: passing arguments to calc
Glad to oblige
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.