A
anne
Hi,
I work under Windows 2000 with Word 2000 and try to open a
Word document out of an project application (version 2002).
The following code does not work:
Private Sub cb_Vorgaenge_Click()
Dim word As Object
Dim DocumentToOpen As String
Dim oDoc As Application
DocumentToOpen = "G:\dummy\Projektvorgänge.doc"
Set word = CreateObject("Word.Application")
Set oDoc = word.documents.Open(DocumentToOpen)
word.Visible = True
End Sub
If I try to open the document I get the message "types are
incompatible" and in the debug modus the value of oDoc is
nothing.
Can anybody help?
Thanks!
Anne
I work under Windows 2000 with Word 2000 and try to open a
Word document out of an project application (version 2002).
The following code does not work:
Private Sub cb_Vorgaenge_Click()
Dim word As Object
Dim DocumentToOpen As String
Dim oDoc As Application
DocumentToOpen = "G:\dummy\Projektvorgänge.doc"
Set word = CreateObject("Word.Application")
Set oDoc = word.documents.Open(DocumentToOpen)
word.Visible = True
End Sub
If I try to open the document I get the message "types are
incompatible" and in the debug modus the value of oDoc is
nothing.
Can anybody help?
Thanks!
Anne