Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
Field Codes - If Field | Microsoft Word Help | |||
Index field codes appear even when Hidden Text is turned off | Microsoft Word Help | |||
How do I turn off field codes in an MS Word document? | Microsoft Word Help | |||
Field Codes | Microsoft Word Help | |||
HOW TO HIDE Field Codes automatically? | Mailmerge |