Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thanks Peter, I thought that might be the case. I just wanted to make sure I
couldn't do anything with it myself without a VB developer. "Peter Jamieson" wrote: A DOCVARIABLE /field/ gets its value from a Word Document Variable, which would typically be created and populated by a bit of VBA code. For example, there may be some Access VBA code which a. opens the template, or a document based on the template b. uses some code like objDoc.Variables("the variable name").Value = some string value obtained from the relevant table/field in Access It is quite possible that "the variable name" would be the same as the Access column name, e.g. if you had a column in Access caled "mycolumn", you might have objDoc.Variables("mycolumn").Value = that string value You would insert that value into the document using a field such as { DOCVARIABLE mycolumn } There would also typically be some code to deal with the situation where the Word Document Variable does not already exist. So...you probably need to identify where that code is and modify it so that it sets up/maintains a Word Document Variable called "mycolumn". Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv On 07/10/2009 18:28, Paul wrote: Hello I have inherited a Word document template (.dot) that contains docvariable fields in it that are populated from a VB-interface/Access database. I am told that the application/DB push the data to this template, unlike a mail merge (I believe). My question is that I would like to add a new docvariable field and am able to. However, after creating it, the field is displayed with the error stating, "Error! Document variable not defined." I am wondering how this field is associated with a specific field in the database? The existing fields in the template all have past values in them. Paul |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
docvariable fields - force negative numbers to disred OR paren - h | Microsoft Word Help | |||
DocVariable fields adjacent to end of cell marks display wrongly | Tables | |||
Use DocVariable field to initiative numbering? | Mailmerge | |||
Help with FIELD CODES: DOCVARIABLE!!! | Microsoft Word Help | |||
Cannot printing DocVariable Field | Microsoft Word Help |