View Single Post
 
Old 12-13-2012, 03:14 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,382
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Brent,

The Content Control/STYLEREF combination works fine for me. Of course, the STYLEREF field must be located in the document header/footer. No vba required.

Also, rather than relying on content controls, bookmarks, cross-references and/or STYLEREF fields, I'd suggest you consider populating custom document properties with your userform (which makes it easy to read back the properties into the userform when the document is re-opened) and combine those with DOCPROPERTY fields wherever you want to custom document property values to appear. With this approach, you don't need duplicate custom document properties for each time a value from the userform is to appear - simply add another DOCPROPERTY field to the document pointing to the same custom document property.

The attached document (cobbled together for a different query) uses content controls to populate a series of custom document properties, and DOCPROPERTY fields to replicate those values. The principle is the same for use with a userform.

PS: Please don't multi-post the same question. I've deleted the separate thread.
Attached Files
File Type: zip CCtrl DocProp.zip (32.8 KB, 166 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote