View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default open word from excel...file does not exist error

Are you sure it's 524 and not 424?

If the error is really 424, it could be because you misspelled WordApp in the
..visible line.

(I don't get 524 when the file doesn't exist (Office 2003).)

tbaam wrote:

I am trying to open a word dopcument from excel...below is the code I am
running but I receive the following error....that is runtime error
524...which indicates that the file does not exit...but it does. I searched
through the other questions and did make sure that the microsoft Word 11.0
object library is available. What am I still doing wrong.

Sub OpenAWordDoc()
Dim WordApp As Object, WorddDoc As Object

Set WordApp = CreateObject("Word.Application")
WordApp.Documents.Open "C:\Documents and Settings\files\Test.doc"
WorddApp.Visible = True

End Sub


--

Dave Peterson