Prev Previous Post   Next Post Next
  #1   Report Post  
fuzmic fuzmic is offline
Junior Member
 
Posts: 0
Default 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
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with setting the value of DOCVARIABLE Amanda Allen Microsoft Word Help 0 September 20th 18 05:09 PM
DocVariable Paul Mailmerge 2 December 1st 09 08:55 PM
docvariable, template (.dot) Paul Mailmerge 2 October 7th 09 08:56 PM
Help with FIELD CODES: DOCVARIABLE!!! Wendy D Microsoft Word Help 2 August 16th 05 08:32 PM
Cannot printing DocVariable Field lubo Microsoft Word Help 1 April 9th 05 07:00 AM


All times are GMT +1. The time now is 01:38 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"