Advanced header and footers - can you auto-populate content into headers and footers from somewhere else in a document?

I have a Word 2013 template I'm creating, with a content control box on the first page. The content they enter here, I would like to show up in the headers, without having to edit the headers. 

Is there a way to do with this with a combination of Quick Parts fields, content controls or such? I've been able to figure out how to populate info with Fields from Quick Parts, but this seems to be a set list of options - I couldn't find a way to add a custom item there. I figured that would be the way to do it.

Answer
Answer
If you want the header content to update automatically, you can use a StyleRef field in the header. For this purpose, you will need to apply a custom (character) style to the content control.
Microsoft MVP (Word) since 1999
Fairhope, Alabama USA
http://ssbarnhill.com
http://wordfaqs.ssbarnhill.com
Screen shots captured with TechSmith's Snagit

2 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

Answer
Answer

Bookmark the CC (e.g. name it bmRef)

Add a REF field to the header e.g., {Ref bmRef}

add this code to the ThisDocument project:


Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim lngIndex As Long
  For lngIndex = 1 To 3
    ActiveDocument.Sections(1).Headers(lngIndex).Range.Fields.Update
  Next lngIndex
End Sub

Greg Maxey
***
Death smiles at us all, but all a man can do is smile back.


For more help with Word visit:
http://gregmaxey.com/word_tips.html

1 person found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 24, 2024 Views 8,264 Applies to: