Reply
 
Thread Tools Display Modes
  #1   Report Post  
Wendy D
 
Posts: n/a
Default Help with FIELD CODES: DOCVARIABLE!!!

I am creating a template for other users. I would like a portion of the
footer to automatically be the same as the "Project Title" that the user will
assign. It seems like I might be able to use the "DocVariable" Field Code to
do this, but I don't understand how to assign/create the variables. Can
anyone help?

Thanks.
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

Wendy D wrote:
I am creating a template for other users. I would like a portion of
the footer to automatically be the same as the "Project Title" that
the user will assign. It seems like I might be able to use the
"DocVariable" Field Code to do this, but I don't understand how to
assign/create the variables. Can anyone help?

Thanks.


If the information is being entered on the Custom tab of the File
Properties dialog, then you need to use a DocProperty field instead of a
DocVariable field.

Document variables can be created and modified only through macro code.
Document properties -- both built-in and custom -- can be managed in the
Properties dialog or by code.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org


  #3   Report Post  
Doug Robbins
 
Posts: n/a
Default

How is the user going to assign the "Project Title"

If it's via a control named txtProjectTitle on a Userform, in the command
button code in the form, you would use

With ActiveDocument
.Variables("varProjectTitle").Value = txtProjectTitle
.Range.Fields.Update
For i = 1 To .Sections.Count
.Sections(i).Footers(wdHeaderFooterFirstPage).Rang e.Fields.Update
.Sections(i).Footers(wdHeaderFooterPrimary).Range. Fields.Update
Next i
End With

Then you would have a {DOCVARIABLE "varProjectTitle"} field wherever in the
document you wanted the Project Title to appear.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
"Wendy D" wrote in message
...
I am creating a template for other users. I would like a portion of the
footer to automatically be the same as the "Project Title" that the user
will
assign. It seems like I might be able to use the "DocVariable" Field Code
to
do this, but I don't understand how to assign/create the variables. Can
anyone help?

Thanks.



Reply
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
Field Codes - If Field pompeyboyUSA Microsoft Word Help 9 November 1st 05 02:16 PM
Index field codes appear even when Hidden Text is turned off kscott25 Microsoft Word Help 3 May 10th 05 05:21 PM
How do I turn off field codes in an MS Word document? Welshwoman Microsoft Word Help 7 March 2nd 05 06:15 PM
Field Codes Meryl Microsoft Word Help 1 February 21st 05 08:07 AM
HOW TO HIDE Field Codes automatically? sorazal Mailmerge 2 February 1st 05 11:33 PM


All times are GMT +1. The time now is 09:45 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"