Hello,
I've got a problem where I'd like to have a word document open from Excel, It seems that I can start Word alright, but any attempt to open a file causes a crash. This makes me think I have the syntax wrong or something. Please help.
VB Code:
If Module1.dhFileExists("C:\instagram\Instagram_Manual.doc") Then Dim wdapp As Word.Application Dim wdDoc As Word.Document Set wdapp = CreateObject("Word.Application") wdapp.Visible = True Set wdDoc = wdapp.Documents.Open("C:\instagram\Instagram_Manual.doc") Set wdDoc = Nothing Set wdapp = Nothing Else MsgBox "Manual was not found." Exit Sub End If
If I comment out the Set wdDoc = wdapp.Documents.Open("file") line, Word opens fine. If I don't, I have to send an error report to the great bit bucket in the sky that is Microsoft Development.
Please advise.
R




Reply With Quote