View Single Post
 
Old 09-15-2013, 05:12 AM
tinfanide tinfanide is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2011
Posts: 312
tinfanide is on a distinguished road
Default Run-time Error 5174: Open Word Documents from Excel

Early binding; opening a Word Document from Excel VBA.
First time, no error.
Starting from then, it returns the error stated in the codes below:
How could I fix it?

Code:
Public Sub SendToWord()

Dim myWord As Word.Application
Set myWord = New Word.Application
With myWord
    .Visible = True
    ''' Run-time Error 5174
    ''' Application-defined Error or Object-defined Error
    myWord.Documents.Open Filename:="1.doc"
End With
Reply With Quote