F
flemming johansen
Hi.
I'm trying to read word document properties in access 2003. But I get the
following error:
Run-time error
Automation error
the module was not found
I'm using the following code:
Dim wd As New Word.Application
Dim doc As Word.Document
Dim sFileName As String
'
' read doc path from table: Setup
'
Set rstSetup = db.OpenRecordset("Setup", dbOpenDynaset)
With rstSetup
If rstSetup.BOF Then
MsgBox ("Sti til doc ikke defineret. ")
rstSetup.Close
GoTo lut
End If
rstSetup.MoveFirst
docpath = !PathDoc
End With
rstSetup.Close
sFileName = Dir(docpath & "\*.doc") 'Gets the first Word document
Do While sFileName <> ""
Set doc = wd.Documents.Open(docpath & "\" & sFileName)
.... more code here
the above "Set doc" statement generates the error.
Can someone help me.
I'm trying to read word document properties in access 2003. But I get the
following error:
Run-time error
Automation error
the module was not found
I'm using the following code:
Dim wd As New Word.Application
Dim doc As Word.Document
Dim sFileName As String
'
' read doc path from table: Setup
'
Set rstSetup = db.OpenRecordset("Setup", dbOpenDynaset)
With rstSetup
If rstSetup.BOF Then
MsgBox ("Sti til doc ikke defineret. ")
rstSetup.Close
GoTo lut
End If
rstSetup.MoveFirst
docpath = !PathDoc
End With
rstSetup.Close
sFileName = Dir(docpath & "\*.doc") 'Gets the first Word document
Do While sFileName <> ""
Set doc = wd.Documents.Open(docpath & "\" & sFileName)
.... more code here
the above "Set doc" statement generates the error.
Can someone help me.