J
JP
I have an Access 2000 application that I'm using to enter data in text Form
Fields in various Word 2000 documents. The code I'm using in Access is
similar to this:
Dim wordApp As Word.Application
Dim wordDoc As Word.Document
Set wordApp = CreateObject("Word.Application")
Set wordDoc = wordApp.Documents.Open(vDocname,False, True, False, , , True,
, , , , False)
wordDoc.FormFields("FF1").Result = vData1
wordDoc.FormFields("FF2").Result = vData2, etc.
where vData1 and vData2 are data elements coming from the database.
The strings to be put into the Word documents are long strings of text.
When the string is longer than 255 characters, I get Run-time error 4609
(String too long). Is there a limit on passing text through automation? Is
there any way around it?
I want to use FormFields (rather than bookmarks) because the client wants
the Word documents protected to prevent them from being changed by users --
and use of bookmarks would require me to unprotect the form, insert the
text, and then re-protect the form (thus creating the possibility of a
failure that will leave the form unprotected).
Thanks in advance.
Fields in various Word 2000 documents. The code I'm using in Access is
similar to this:
Dim wordApp As Word.Application
Dim wordDoc As Word.Document
Set wordApp = CreateObject("Word.Application")
Set wordDoc = wordApp.Documents.Open(vDocname,False, True, False, , , True,
, , , , False)
wordDoc.FormFields("FF1").Result = vData1
wordDoc.FormFields("FF2").Result = vData2, etc.
where vData1 and vData2 are data elements coming from the database.
The strings to be put into the Word documents are long strings of text.
When the string is longer than 255 characters, I get Run-time error 4609
(String too long). Is there a limit on passing text through automation? Is
there any way around it?
I want to use FormFields (rather than bookmarks) because the client wants
the Word documents protected to prevent them from being changed by users --
and use of bookmarks would require me to unprotect the form, insert the
text, and then re-protect the form (thus creating the possibility of a
failure that will leave the form unprotected).
Thanks in advance.