View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
GS[_6_] GS[_6_] is offline
external usenet poster
 
Posts: 1,182
Default Unable to open Word file from Excel


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.


The Word files are closed, closed, closed. I even created new blank Word
files and still the same result. The above code works at home, but
in another network environment I can't get Excel to open any Word file,
even files that I created myself. It gives runtime error 5457.


Hmm! The actual wording of the error Description will give a clue as to why the
file can't be opened. Does the 'other network environment' require permissions,
OR is the file in use by other user[s]?

Note that closing the file in Word does not necessarily release the edit lock
on the file; - it may be necessary to close the using instance as well!

Did you try opening with the ReadOnly arg set to 'True'?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion