Results 1 to 4 of 4

Thread: Excel Crashes when trying to Open Word Document

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2004
    Location
    Cambridge,MA
    Posts
    20

    Resolved Excel Crashes when trying to Open Word Document

    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:
    1. If Module1.dhFileExists("C:\instagram\Instagram_Manual.doc") Then
    2.         Dim wdapp As Word.Application
    3.         Dim wdDoc As Word.Document
    4.         Set wdapp = CreateObject("Word.Application")
    5.         wdapp.Visible = True
    6.         Set wdDoc = wdapp.Documents.Open("C:\instagram\Instagram_Manual.doc")
    7.         Set wdDoc = Nothing
    8.         Set wdapp = Nothing
    9.     Else
    10.         MsgBox "Manual was not found."
    11.         Exit Sub
    12.     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
    Last edited by recarv; Oct 21st, 2004 at 02:00 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width