Receiving command line parameters in Word Add-in

P

pavan

Hi All,
If a word document is created/opened using automation i.e. using
documents.Add and doucments.Open respectively, can we pass any command
line parameters/arguments?

Is it possible for the add-in to be able to receive those parameters?
Any response will be appreciated
TIA
Regards,
Pavan
 
C

Cindy M.

Hi Pavan,
If a word document is created/opened using automation i.e. using
documents.Add and doucments.Open respectively, can we pass any command
line parameters/arguments?

Is it possible for the add-in to be able to receive those parameters?
No, no parameters can be passed to a document being opened/created
(beyond those defined in the Open and Add methods). Generally,
automation would assign the object to a variable, then do with it
whatever needs to be done.

What kind of thing do you have in mind, more exactly?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
K

Karol P

Cindy,

i think i have the same problem, no solution,

we wanted to know, how to run e.g. Word with command-line switches

and read those parameters from the Addin,

i've tried to access the command line using current running process

in the OnConnection method of the Addin:

Process proces = Process.GetCurrentProcess();
ProcessStartInfo procesSI = proces.StartInfo;
string cmdlineArgs = procesSI.Arguments;

but it returns empty string,

i will be grateful for the response

with best regards

Charles
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top