Using DocVariable
Hi gurus
I am still using very old Word 2003 and want to explore the use of Variables.
I have get into the Tools .. Visual Basic Editor to type in the Document module
Sub GetSetDocVars()
Dim fName As String
fName = "Jeff Smith"
' Set contents of variable "fName" in a document using a document
' variable called "FullName."
ActiveDocument.Variables.Add Name:="FullName", Value:=fName
End Sub
Then at the insert Field DocVarible
I type in the variable FullName
The following {} field code appear
DOCVARIABLE FullName \* MERGEFORMAT
but on Alt-F9, nothing is displayed
This is my first attempt at using variables in Word even though i have done some VB6 and VBA coding
Please guide me to get in. Thanks peers.
Last edited by fuzmic : July 5th 19 at 08:21 AM
|