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

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.
0
Utf
12/30/2009 9:54:02 PM
word.vba.general 1023 articles. 1 followers. Follow

2 Replies
1795 Views

Similar Articles

[PageSpeed] 42

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

"ddwillard" <ddwillard@discussions.microsoft.com> wrote in message 
news:E98DBCC0-9100-4967-936E-7C5C98D816F5@microsoft.com...
> 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. 

0
Doug
12/31/2009 1:46:54 AM
On Wed, 30 Dec 2009 13:54:02 -0800, ddwillard
<ddwillard@discussions.microsoft.com> wrote:

>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.

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
0
Jay
12/31/2009 3:03:39 AM
Reply:

Similar Artilces:

Auto complete form field from separate list
I can't seem to find the answer with the paperclip. I'm designing a form in a worksheet. One field intended for the user t input a "city name" We may be using 20 or 30 cities in total. It woul be great just to have to type a few letters and smack enter. I kno I'm a bonehead cause I can't figure it out, because it's probabl something simple I just haven't figured out yet -- famdaml ----------------------------------------------------------------------- famdamly's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2938 View this thre...

Outlook & Word
I've just started using Oulook. I have the latest version installed and Office 2003. Every time I compose a message, or reply to a message, it's using Word as the editor. How do I change this and use just Oulook. Also, from a Word document, when I click on "send to", it pastes my document in the body of the e-mail, instead of attaching it to the e-mail. What should I do to: 1) Use Outlook as the editor; 2) Prevent it from copying my Word doc to the body of my message? Any assistance greatly appreciated! Tools->Options->Mail Format - uncheck the option to use W...

How can I enarge the font size in a drop-down list?
1. How can I enarge the font size in a drop-down list? 2. How can I prevent someone from changing or deleting the formula in a cell? When I try to protect the cell it prevents the formula from being executed. Formulas still work when protected. If you are using data>validation you cannot change the font, you can use a macro that zooms http://www.contextures.com/xlDataVal08.html#Font -- Regards, Peo Sjoblom "BobH" <BobH@discussions.microsoft.com> wrote in message news:A63E65DE-CFB3-40FA-B1D8-0E576A436885@microsoft.com... > 1. How can I enarge the font size i...

Automatic Date in Word Document
I need to create a document that I will be sent as an attachment to an email. I want the document to automatically reflect the date the document was sent. I do want to open the document itself. How do I do this? Thank you. -- valerie The only dates that are available to you are 1. A date that you manually enter into the document 2. The date on which the document was created (by use of the { CREATEDATE } field 3. The date that the document was last saved (by use of the { SAVEDATE } field 4. The date upon which the document was printed ( by use of the { PRINTDATE...

need help with formula on summary page
I need help setting up a formula on a summary page. I have a ton of worsheets that are all set up the same. My summary page is set up differently but I need the total off each tab linked back to my summary page. I am working in Column Q and the info I need is in cell F28 on each sheet. An example of my formula now is ='T-4-1'!$F$28. Thanks in advance Zach f Try this one Zach f http://www.rondebruin.nl/summary2.htm -- Regards Ron de Bruin http://www.rondebruin.nl "zach f" <zachf@discussions.microsoft.com> wrote in message news:6EBBC383-B4C3-4B46-BE72-...

Need product key for Office XP Developer
Please take pity on the absent minded. Back in the heyday of Office XP, I never had the need to set up the developer tools for it. I was a subscriber to MSDN Universal so have all of the DVDs. I just never jumped through their hoops of going on the MSDN site to lookup the product and get the key. I didn't need it then. Now it's out of support and the keys for obsolete products are no longer available from MS. My email address is readily decodable. I'll be most grateful. Thanks -- -Larry- -- To anyone who may have been digging in their archives on my behalf; Thanks, but ...

Business Fax is also in my contact list
When I try to send out a mass e-mail to my suppliers, I get their business fax in my contact list. Is there any way to deactivate this. Thanks for any help. ...

Outlook 2003 Distribution List error
System running XP SP3 My customer has a Distribution List (5 entries), and it was working correctly for some time. Now, when she sends to the List, there are two additional names included from her address book. Editing and/or expanding the list does not show these names.... Ideas? Where to look? Thanks in advance. Grov ...

Debug Assertion Failed Message in afx.inl at line122 & afshtml.inl file at line 57
Hi, I am getting some Debug Assertion Failed in afx.inl at line 122 and in afxhtml.inl at line 57 Messages on PCs. If i do "Rebuild all" again on my PC then the code starts working. But it gives "Debug Assertion Failed message of afx.inl file at line 122" on other PC. And if i do "Rebuild All" on that second PC then it gives "Debug Assertion Failed message of afxhtml.inl file at line 57" on my PC. It is a debug build. If i take the exe and create a installer then also the installer works on many PCs but gives the message of afx.inl file. The afx.inl li...

when i try to type on my microsoft word, it tell in wortten word
when i try to type on my microsoft word, it tell in wortten word MODIFCATION IS NOT ALLOWED BECAUSE THE DOCUMNT IS LOCKED. HELP, PLEAS..... ...

Duplicating text in Word 2007
Hi, I've got a template I previously did for Word 2003 where I basically had several {macrobutton nomacro Type something here} fields. Now, in Word 2007, I see I have the option to actually add a Text content control, which looks fantastic :) BUT, is there a way of making it so that if I type something in one content control, the same text value is automatically added into the second one as well? Or even a third? How can I do that? Found out that if I insert a comment field and copy that field, they both work as I want! Yay! But, the comment field I insert via the Insert...

Remove "Bin not found" line from Picking Ticket
After converted from GP7.5 to GP 8.0, I found that the system using a new picking list form called "SOP Blank Picking Ticket Order Entered" which is totally different than the one "SOP Blank Picking Ticket" I used at version 7.5. During printing, I have "Bin not found" message printed at the following line of each inventory item. How can I get rid of this additional line. We do not assign the bin to each item. I tried to remove the "SOP Blank Picking Ticket Order Entered" from Modified report list and import the form I used at 7.5 but "SOP...

switching users
I have a computer that on which I needed to create a new user profile. I set up Outlook on the new profile with the same email account, but it gives me an error when retrieveing mail. I have Outlook 2000. I have checked the account settings several times. I can retrieve the email if i set up the account on another computer. Any thoughts? Thanks, Peter peter wrote: > I have a computer that on which I needed to create a new user profile. > I set up Outlook on the new profile with the same email account, but > it gives me an error when retrieveing mail. I have Outlook 2000. I > ha...

security group/distribution list administration
please take a look at the thread below. i posted this earlier today to the AD group. someone suggested to check here as well to possibly find a workaround instead of having to create and maintain two separate groups. thanks. ------------------------------------------ So far I know you have to create two groups, but check the exchange group, they may have some smart tricks. -- Regards Christoffer Andersson No email replies please - reply in the newsgroup ------------------------------------------------ http://www.chrisse.se - Active Directory Tips "toto" <toto@discussions.mic...

Need to import contacts but only allow certain groups access
Hi, Just wondering what the best practice is for storing external contacts I've imported, that I only want certain groups to be able to access. I guess I could create a public folder, but since these are slowly being withdrawn, maybe not? I'm currently considering adding the contacts to a particular OU, then creating an address book which filters for a property set on the contacts. I'd then propose setting the appropriate NTFS permissions on those contacts. Any suggestions appreciated. > I'm currently considering adding the contacts to a particular OU, then > c...

How can I update endnote cross-references in Word 2007 ?
I created a long document with many endnotes and some cross-references to these endnotes. When I insert a new endnote somewhere in the document, the following endnote numbers change but not the cross-reference numbers. This seems to be a bug in Word 2007 as it worked perfectly in my previous Word version. How can I update endnote cross-references in Word 2007 ? Ctrl+A, F9 should work in all versions of Word. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "Joe56" <Joe56@discussions.microsoft.com> wro...

Outlook has encountered problems and needs to close.......
it just will not stay open. I have reverted to using plain text email editor. If I've detect & repaired once I've done it 10 times Howard: We've got the same problem on our system. OL 2000. Can't send email. If we try (through this one machine on our 4 computer network) the machine will show that same error message you describe and when we hit the enter key, Outlook immediately shuts down. IF you get this figured out, please let me know. Good luck and thanks. Scott in Austin MN "Howard" <anonymous@discussions.microsoft.com> wrote in message news:2a2001c...

Line Jumps
I'm using Vision 2002 SR-1. I've done my best to implement line jumps, but I just can't get the darn things to work. Here are my settings for Page Setup | Layout and Routing Style: Flowchart Direction: Top to Bottom Separate: Using routing style Overlap: Using Routing Style Appearance: Straight Add Line jumps to: Last Routine Line Line Jump Style: Arc I've tried the Unrelated Lines and All Lines under Separate & Overlap, and about every line type under Add Line Jumps To. Nothing works! And I've used the Connector Tool and the Line Tool - both fail miserab...

Outlook won't open first Word attachment
Trying to help a user with the following problem - any suggestions? When he tries to open Word 2000 attachments in Outlook 2002, he receives the installing prompt from Word, it goes through the entire install, then opens to a blank black screen, he then closes out of Word and receives the error "The System cannot find the file specified." When he goes back to Outlook and clicks on the next Word file attachment, it opens correctly in Word. However, this installation issue happens the first time each morning. Other users in the office do not have this problem. Both Outloo...

can i create a guestbook using microsoft publisher?
I am trying to create a web page with a guestbook for visitors to sign. Can I create a guestbook using microsoft publisher 2007? Quicker answers may be found at microsoft.public.publisher.webdesign ? "Jill B" <Jill B@discussions.microsoft.com> wrote in message news:ED514120-CB19-4E64-9E0B-865140EB0B84@microsoft.com... >I am trying to create a web page with a guestbook for visitors to sign. Can >I > create a guestbook using microsoft publisher 2007? Jill, No. A guestbook will require (at least in most cases) a database as well as either php or asp. Try www.sou...

I need to compare 3 numbers and find the one in the middle
I have three numbers in a single row and would like to identify the middle number enter that number in another cell. Example: 1st # 2nd # 3rd # result 628 678 720 678 655 625 700 655 748 720 725 725 is there a function in excel that can do this? Thanks, Eddie Try =LARGE(A1:C1,2) VBA Noo -- VBA Noo ----------------------------------------------------------------------- VBA Noob's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3383 View this thread: http://www.excelforum.com/showthread.php?threadid=56811 fasteddie wrote.....

How to make distribution list from database.
Hi. I have a database containing 3000 members. Every week we send a mail to all members - this is done manually. Is it possible to extract the mail address from the database and put them in a distribution list, witch we can send our newsletter to. My thought is that this can be an automatic process. Regards Morten. A query based DL could do the job. "morten" wrote: > Hi. > > I have a database containing 3000 members. Every week we send a mail to > all members - this is done manually. Is it possible to extract the mail > address from the database and put them...

Changing Data Series in a Chart from Bar to Line
Happy New Year everyone! I have a question regarding charts in MS Access. I am able to create a chart that uses both bars and lines to return data, however, I can not figure out how to specify which data series are returned as bars and which are returned as lines. Any help in this matter would be greatly appreciated. Thanks! Chad ...

Switching identities in Outlook Express #2
I have a new computer and am trying to use my two email addresses separately, as I did on my old computer. Both are listed in Accounts under Tools, but when I try to switch from the first identity to the second, it acts like it is going to switch, but it doesn't! And all of my incoming email to both addresses comes to the first address. I use Earthlink (mindspring) and have talked to their tech people but they couldn't help. I hope someone can! Thank you! Susan <anonymous@discussions.microsoft.com> wrote: > I have a new computer and am trying to use my two email >...

Need a quanity of items printed
I am working with Excel 2003. I am new to excel and having some difficulties. I Have a form that requires 5 pages be printed out. WhAT I am trying to do is have a field that updates based on the quantity printed. For example for the first page printed the field would reveal a 1 and the next page would have a 2 followed by the next page at 3. This would go up to a max of 5 pages. Any way I can do this? Try File | Page Setup... | Header Footer | Select the footer to add from the drop down. -- HTH... Jim Thomlinson "DevilDog1978" wrote: > I am working wit...