I need a list of command line switches for Microsoft WORD.

D

ddwillard

I am using a Shell command to execute Microsoft WORD 2003. I need to halt
execution of VBA code until WORD finishes it's task. Is there a command line
switch for WORD to cause it to pause the VBA function until it is finished?
Is there a VBA command to pause execution of code until WORD finishes? Thanks.
 
D

Doug Robbins - Word MVP

I am pretty sure the answer to your specific question is "No". If you tell
us exactly what you are doing, including from where the Shell command is
being executed, maybe we can suggest another way that will overcome the
problem.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
 
J

Jay Freedman

I am using a Shell command to execute Microsoft WORD 2003. I need to halt
execution of VBA code until WORD finishes it's task. Is there a command line
switch for WORD to cause it to pause the VBA function until it is finished?
Is there a VBA command to pause execution of code until WORD finishes? Thanks.

Although you can find the list of command line switches at
http://support.microsoft.com/?kbid=210565, it isn't going to help with
the need you stated.

If the VBA is running inside Word, then nothing you could put on the
Word command line will have any effect because *Word is already
running*.

Whether you can do what you want depends entirely on exactly which VBA
function you're calling. For example, if you're printing the document
from VBA, use the syntax

ActiveDocument.PrintOut Background:=False

The Background parameter controls whether execution of the VBA code
continues to the next line immediately (when Background is True, which
is the default if you omit the parameter) or waits until the document
has been completely handed off to the Windows spooler.
 

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