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
1762 Views

Similar Articles

[PageSpeed] 19

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:

Microsoft
Support plan states that "Managed User" will receive an answer from Microsoft within 48 hours if a community user does not answer, but that does not appear to be happening. Please comment. When did you post your query to this newsgroup / and what is the title? Regards James "Lisa Rivers" <LisaRivers@discussions.microsoft.com> wrote in message news:E13EE281-E188-4721-8CC9-D51AD25F27C0@microsoft.com... > Support plan states that "Managed User" will receive an answer from > Microsoft > within 48 hours if a community user does not answer, bu...

Activies Showing Up In Another Users "My Activites" List
I have a user who is seeing 2 activites from another user. It would seem that the user also sees these activites. We tried re-assigning the activity but this did not work. Any other tips? ...

new message window (Microsoft Word) opens 1/2 way!
When we go to compose a new message in Outlook 20000, the window only opens up 1/2 way and we have to maximize it. There have been a few times that the window will open up all the way but not sure if there is either a regestry setting or local setting that would control this feature??? Thanks! On hands and knees, Paul crawls to SilverRaven and begs: >When we go to compose a new message in Outlook 20000, the >window only opens up 1/2 way and we have to maximize it. >There have been a few times that the window will open up >all the way but not sure if there is either a re...

MS-Word to XML to HTML
I have a need to convert MS-Word Documents (6.0 / 97 / 2000 / 2003) to XML and from XML to HTML. This needs to be done programmatically with C/C++/C#. Any information on doing this would greatly be appreciated. Thanks, Dave ...

random select a percentage from a list
I am trying to randomly select a percentage from a list of 891 for assessment interviews. Do I use Rand ()*.1 for 10 percent of the selection? =RAND() gives you a number between 0 and 1 =RAND()*891 will give you a number between 0 and 891 You can round it to the nearest 1 with =ROUND(RAND()*891,0) If you only want to look at 10% of the 891, you can use =ROUND(RAND()*891*0.1,0) which will give you a number from 0 to 89. It is not clear exactly what you mean but i think you'll get what you need from what I have written. -- Allllen "Rocetman" wrot...

Using Sound Recorder in Word VBA SOMETIMES does not work
I am recording short (< 60 secs) snipets of sound using Sound Recorder under control of Word VBA using the following Public Sub recordSound() Selection.InlineShapes.AddOLEObject ClassType:="SoundRec", FileName:="", LinkToFile:=False, DisplayAsIcon:=False End Sub All is OK most of the time but on some machines I get a message that says "Unable to load package" (or something like that ... I have never seeh it but 2 people have reported this). Does anyone know what might be causing this? I think both occurances were under Word 2007 on Vista. ...

How do you open PDF files with Word 2007?
I must figure out how to open PDF files in Word 2007. I am taking on line classes and work is shared in PDF format. I have a new Dell Inspiron laptop that came loaded with Windows 7. I have had it a week and need help. I tried to download the Microsoft PDF add on, but it did not work. I can only read code when I open incoming PDF files. The default program is listed as Word. What am I doing wrong? You don't. You need a PDF reader, the most common being Adobe Acrobat Reader which you can download for free. It is huge and has some clever tools, but if you only want to read th...

format cell to allow listing
How do I make a list within a cell (when I press enter, it goes to the next cell below- is there any other way besides 'wrap text' and putting in spaces? To create a manual line break, use: <Alt> <Enter>. -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ============================================== "cy" <anonymous@discussions.microsoft.com> wrote in message news:1536c01c3fa2c$66a21870$a501280a@phx.gbl... How do I make a list within a cell (when I press enter, it goes to the...

Inserting Excel Data into Word Columns
Hi, I am fairly new to VBA and Excel/Word and have been trying to automat a sheet we have, I have created the Excel Sheet and unfortunately th Word doc was created sometime ago and cannot be changed. I have searched this forum and found this code: Code ------------------- Sub CreateNewWordDoc() ' to test this code, paste it into an Excel module ' add a reference to the Word-library ' create a new folder named C:\Foldername or edit the filnames in the code Dim wrdApp As Word.Application Dim wrdDoc As Word.Document Dim i As Integer Set wrdApp = CreateObject(&qu...

Help needed for a simple spreadsheet
I use MS office 2000, using excell to calculate costings, i would lik to simplyfy the way i use the spreadsheet to calculate costs but canno find out how to set up a basic database which will automatically link t the spreadsheet, any help would be gratefully appreciated. Using a simple 5 column spreadsheet i would like to set it up a follows. Column A - enter simple item code (upto 10 digits) which wil auto-complete after 3 digits and allow scrolling through similar code until the correct item is found, column C would then automatically b entered with the full item description and column D...

ALT+F8 macro list without showing "Personal.xlsm!" for every macro?
Is there a setting somewhere that will allow me to call up my list of macros with ALT+F8 and _not_ have "Personal.xlsm!" show in fornt of every one of them? It would make things just a bit easier if I could call up the list and begin typing the macro name and have the list find it for me. Ed ...

Smart List export not working
When I export out the smartlist results by clicking excel, I get the error 'EXP 1493. The Product is not currently loaded'. I checked my client, exp1493.exe is there and it is not read only. exp1493.dic is also there. This is GP 80 On Mon, 30 Aug 2004 18:52:42 -0700, "AA" <anonymous@discussions.microsoft.com> wrote: >When I export out the smartlist results by clicking excel, >I get the error 'EXP 1493. The Product is not currently >loaded'. > >I checked my client, exp1493.exe is there and it is not >read only. exp1493.dic is also th...

desparately need help
i installed the camera icon on the QAT last week and experimented with it. got the message "The picture is too large and will be truncated". Now i get that message on every file and every time a enter something in a cell. i have removed the camera icon and have re-booted but am still having trouble. thanks in advance -- aprilshowers ...

Need help with collection serialization
Can some Please tell me why the following collection is not XML Serializable: Imports System.Xml Imports System.Runtime.Serialization Namespace MyNamespace <Serializable()> Public Class SpecialResult Private m_SpecialID As Integer Private m_Description As String Private m_Adjustment As Decimal Public Property SpecialID() As Integer Get Return m_SpecialID End Get Set(ByVal Value As Integer) m_SpecialID = Value End Set End Property Public Property Description(...

Msg: "Some features ... not supported by Word 97"
On some documents, when I save I'm interrupted by the message "Some of the features in this document aren't supported by Microsoft Word 97". I want to answer "SO WHAT?" but maybe I could do something constructive to stop these. Anyone have a way to do it? -- Christopher Brewster Lockheed Martin, Eagan MN Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/ms-word-general/200911/1 Go to Tools | Options | Save and clear the check box for "Disable features introduced after..." If this is Word 2007, and you have chosen Wo...

edit subject line of outgoing messages
i need to edit the subject line of outgoing messages. i would like to be able to append, as well as do a search and replace on them (if possible). anybody done this before? g On Fri, 23 Mar 2007 14:55:34 -0600, "George Frederickson" <george@somewhere.com> wrote: >i need to edit the subject line of outgoing messages. i would like to be >able to append, as well as do a search and replace on them (if possible). >anybody done this before? > >g > 3rd party software would be your best bet. IMSS, Tumbleweed etc... If you are using Exchange 2007 you cou...

distribution lists #4
Does anyone know if anything can be done to fix my outlook problem? If I send an email to a distribution list and one of the addresses bounces ( invlaid, box fill, vacation setting, etc; ), everyone on my distribution list get the message reply not just me. How can I change the settings/preferences so everyone on my distribution list does not see the bounces or returns. Thanks!! Jenny ...

Want to buy just EXCEL 2003 not the entire microsoft office suite
Hello, > > I live in Toronto, Canada and want to upgrade from a microsoft works > version > spreadsheet to EXCEL 2003. How do I go about doing that. I did download > previously a free trial version of EXCEL but I don't remember the product > key. > > How do I go about purchasing EXCEL 2003 only and not the entire microsoft > offce suite? Can I buy a download and not the CD? -- Jeffrey Brown http://www.microsoft.com/office/excel/howtobuy/default.mspx Or find a third-party reseller http://shop.microsoft.com/helpdesk/reseller.asp The Microsoft Excel 2003...

Dropdown lists
Hi all :) how do i create dropdown lists, ie so i can select a name from a lis instead of typing it hope you understand what i mean :confused: thanks for any help Stev -- Message posted from http://www.ExcelForum.com Hi Steve you can use Data validation for this. Try the following: - Select the cells you want a listbox for - Goto 'Data - Validation'. Choose 'List' and select a range with your stored names for the listbox For more information on data validation have a look at http://www.contextures.com/xlDataVal01.html Frank > Hi all :) > > how do i crea...

Microsoft Office 2004
Hi I have been using the microsoft office 2004 on an ibook G4 on panther for the last 6 months. Recently, it is refusing to read some of the excel and powerpoint file created on a PC under the Office 97. I can see the file name but not the icon next to it when I look under Finder. When I click on the file name, the file disappears from view completely. At first I thought it was a software issue so I re-install the Microsoft Office 2004, but the problem persists. Has anyone encountered this problem? Any suggestions to solve it would be much appreciated. Thanks in advance, June In artic...

A pal needs help on this site
A pal needs help on this site greetings fellow newsgroupers. I recently found a site called Microsoft Forums. In a very short time I became very known to the site and its an excellent tool. This guy who runs it is good too but needs a helping hand. Please do me a favor and check it out at http://www.msforums.org/ Categories are like Microsoft Windows, Microsoft Office, Microsoft Gaming, Servers, Developer and so on. Thanks to everyone. MDO Pro -- I go to Microsoft Forums, do you? http://www.msforums.org/ ...

Help needed with mail returned as possible spam
We have about 10 computers using Bellsouth DSL service, with Bellsouth hosting our domain. Our Outlook clients are set up for POP3/SMTP using mail.ourdomain.com. A few days ago, we began having email problems, especially when we try to send emails to each other. The returned emails say they are being rejected by the mailserver as possible spam. One of the returned emails said "Host blacklisted in sbl-xbl.spamhaus.org.swh.bellsouth.net." It then identified our public IP address. However, that IP address does not show as blacklisted on the spamhaus.org website. I rectifie...

Need help merging two Worksheet_Change modules #2
Thanks Dave, this is almost exactly what I want! The only thing I nee in the module now is that when they try to delete a validated cell an the INVALID appears, I want the cursor to return to that cell to forc them to select from the list - at the moment they can continue leavin INVALID as the value. Perhaps a message box telling them what the have done wrong would also be useful? Thanks in advance Fuzz -- fuzzyfrea ----------------------------------------------------------------------- fuzzyfreak's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1465 View thi...

Listing out Budget, Actual and Forecast
Dear all, We have 3 tables for Budget, Actual and Forecast and the following is the example. The account in the tables can be different. We do not have a MASTER table to list out all the possible combination of centre and account Budget Centre Account Amount 001 100 $50 002 200 $500 Actual Centre Account Amount 001 100 $55 002 250 $300 Forecast Centre Account Amount 001 100 $60 002 ...

Running an old version of Microsoft Money on Windows 98
I have an old disk which came with my original computer running windows 95. I would like to download Microsoft Money from the support disk to my current computer with windows 98. When I load the disk into my E drive, I get an error message that file VBRUN300.dill cannot be found. I downloaded VBRUN300.exe from the MSN download site, the disk still will not run and I get the same message. Any suggestions? You can't just "download," you must "install" or "setup." It is entirely possible that the support CD that came with your Win95 computer WAS NOT DE...