Here's my code:
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = False
Not required since the automated instance will not be visible until you make it
visible and/or give control to the user!
Set WordDoc = WordApp.Documents.Open(myFile)
For some reason I keep getting a runtime error 5457,
which says something like "File is open or being used".
I know for a fact that the Word file is NOT open and nobody is
using yet. I've even tried different Word files, but still the
same result. Does anyone know what the problem might be?
Is it related to the file permissions?
Did you have Word open already, AND opened the file there first? You may have
to close that instance BEFORE using an automated instance to open one of its
files, even though that file was manually closed there.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion