I
imatter
Can anyone tell me why the following lines of code yield different results?
Set wordApp = GetObject(, "Word.Application")
Set wordApp = GetObject("", "Word.Application")
Example Code 1:
If WINWORD.EXE is open this line works as expected. It uses the exiisting
WINWORD.EXE and therefore does not cause the Normal.dot error** If
WINWORD.EXE is not open before execution of the script I get a Run-Time error
'429' when executing the script.
Example Code 2:
I doesn't matter whether or not WINWORD.EXE is open, this code opens a new
instance of WINWORD.EXE which causes the Normal.dot error. Writing the code
this way gets rid of the Run-Time error '429'.
Office 2003, Outlook to Word macro.
** Normal.dot error: when two instances of WINWORD.EXE are open, one is the
owner of the template file and locks it so when you close one of the
documents it wants you to save a copy of the Normal.dot
Set wordApp = GetObject(, "Word.Application")
Set wordApp = GetObject("", "Word.Application")
Example Code 1:
If WINWORD.EXE is open this line works as expected. It uses the exiisting
WINWORD.EXE and therefore does not cause the Normal.dot error** If
WINWORD.EXE is not open before execution of the script I get a Run-Time error
'429' when executing the script.
Example Code 2:
I doesn't matter whether or not WINWORD.EXE is open, this code opens a new
instance of WINWORD.EXE which causes the Normal.dot error. Writing the code
this way gets rid of the Run-Time error '429'.
Office 2003, Outlook to Word macro.
** Normal.dot error: when two instances of WINWORD.EXE are open, one is the
owner of the template file and locks it so when you close one of the
documents it wants you to save a copy of the Normal.dot