J
JP
I have an Access application that drives data into FormFields in Word docs.
The word docs are protected (Tools|Protect Document). The basic code is
below:
Dim wordApp As Word.Application
Dim worddoc As Word.Document
Set wordApp = CreateObject("Word.Application")
Set worddoc = wordApp.Documents.Open(FOLDER_NAME & sWordDocName, False,
True, False, , , True, , , , , False)
worddoc.FormFields("Field1").Result = "abcdef"
The application works fine under Access 2000/Win2K/Office 2K, Access
2002/Win2K/Office 2002, Access 2000/XP/Office 2K, Access 2002/XP/Office 2002
but fails under Office 2003 (Access 2003/XP/Office 2003.
The error code is -2147417851 and the message is "Method result of object
formfield failed". The error occurs when executing the .result command.
Anybody have any thoughts/experience with this? I can't find anything in
the KB yet.
Thanks.
The word docs are protected (Tools|Protect Document). The basic code is
below:
Dim wordApp As Word.Application
Dim worddoc As Word.Document
Set wordApp = CreateObject("Word.Application")
Set worddoc = wordApp.Documents.Open(FOLDER_NAME & sWordDocName, False,
True, False, , , True, , , , , False)
worddoc.FormFields("Field1").Result = "abcdef"
The application works fine under Access 2000/Win2K/Office 2K, Access
2002/Win2K/Office 2002, Access 2000/XP/Office 2K, Access 2002/XP/Office 2002
but fails under Office 2003 (Access 2003/XP/Office 2003.
The error code is -2147417851 and the message is "Method result of object
formfield failed". The error occurs when executing the .result command.
Anybody have any thoughts/experience with this? I can't find anything in
the KB yet.
Thanks.