Word CommandLine

L

Lall

Hi,

I want to get the command line and parametres for any word with
a macros in VBA.
Is it possible ????

For example, if I want to print a document, I make :
winword.exe /print Ex.doc

Now, i want to get the parameter, here "/print Ex.doc"

How to do that ??

Thanks
Lall
 
D

Dave Lett

Hi Lall,

I think you need to have a look at Word's help file topic "Control what
happens when you start Microsoft Word". There is no switch for printing. You
can, however, create a macro that will print your document and run that as
you open the specified docoument. You will end up with something like the
following for your command line:

"C:\Program Files\Microsoft Office\Office\Winword.exe" C:\Ex.doc
/mPrintTheDocument

where the macro "PrintTheDocument" contains a routine for printing the
current document.

HTH
 

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