B
Bill Agee
I want to update a Word template with name, address, etc and save it as a
Word document from Microsoft ACCESS. My Word template has the several
DOCVARIABLES such as:
{ DOCVARIABLE "Attyfirm"}
{ DOCVARIABLE "Address1"}
etc.
In Access I am able to open the Word template with
Set WordDoc=WordApp.Documents.Open ("path.DTLetter.Dot")
and then follow with additional VBA statements
WordDoc.Variables("AttyFirm").Value=[wAttyFirm]
WordDoc.Variables("Address1").Value=[wAddress1]
Etc.
WordDoc.Fields.Update
WordDoc.SaveAs Filename=wfilename
WordDoc.Close
The document is correctly saved in the right folder with the proper name,
however, no updates occurred in the saved document, the {DOCVARIABLES
"varnames"} remained unchanged.
Any suggestions?
Word document from Microsoft ACCESS. My Word template has the several
DOCVARIABLES such as:
{ DOCVARIABLE "Attyfirm"}
{ DOCVARIABLE "Address1"}
etc.
In Access I am able to open the Word template with
Set WordDoc=WordApp.Documents.Open ("path.DTLetter.Dot")
and then follow with additional VBA statements
WordDoc.Variables("AttyFirm").Value=[wAttyFirm]
WordDoc.Variables("Address1").Value=[wAddress1]
Etc.
WordDoc.Fields.Update
WordDoc.SaveAs Filename=wfilename
WordDoc.Close
The document is correctly saved in the right folder with the proper name,
however, no updates occurred in the saved document, the {DOCVARIABLES
"varnames"} remained unchanged.
Any suggestions?