#1
|
|||
|
|||
word 2007 - Inserting value in the document header
Hi,
I have document that contains a Text Form field and I would like to take the value of that text form field and insert it in the header. e.g.: see image below. The document is protected to ensure that Text Form fields don't get erased. My objective is to copy the value found in both text form fields into their corresponding cell in the header. I am novice and would appreciate someone's help in providing me with a macro that would do it. Regards, Chuck Last edited by chamdan; 11-13-2013 at 11:02 PM. Reason: having problem Inserting the image |
#2
|
||||
|
||||
There's a couple of ways of doing this:
1. Format the formfield with a unique character Style, then use a STYLEREF field in the header to reference that Style; or 2. Set the formfield's 'calculate on exit' property and insert a cross-reference to its internal bookmark in the header. No code required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
word 2007 - Inserting value in the document header
Hi Paul,
You are telling me to do certain thing that I have never done before and that is why I was asking if one can provide me with a sample? and appropriate macro to achieve that. Would you be able to help? Thanks in advance. Chuck |
#4
|
||||
|
||||
See attached. The field has an internal bookmark named 'Text1' and has the 'Strong' character Style applied. The header uses a STYLEREF field referencing the 'Strong' character Style and the footer uses a REF field referencing bookmark named 'Text1'.
You will note that the header updates as you type the text. The footer, though, won't update till you do a Print Preview. As per my previous post, there are no macros needed for this.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Thank you Paul!
I managed to make it work while I was at work today by setting as you mentioned StyleRef and selected from the list the Formula and have set the name of my text Form field and it worked. But your example provided me with the facility of using text format, when the one I was using was numeric since I had used formula. Anyway, I really appreciate your help. Cheers! Chuck |
#6
|
|||
|
|||
Solved - word 2007 - Inserting value in the document header
Thank you Paul!
Cheers! Chuck |
#7
|
|||
|
|||
|
#8
|
|||
|
|||
Thank you for the Links Charles.
Cheers! Chuck |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Inserting one document into another | Bluie | Word | 5 | 05-17-2012 12:00 PM |
Using Hyperlink to open Word Document at Specific Header | rossi45 | Word | 2 | 05-04-2012 06:03 PM |
header/footer not saving to gallery (word 2007) | lloydc | Word | 0 | 04-30-2012 05:29 PM |
Powerpoint inserting and editing a word document | Zeeb | PowerPoint | 2 | 02-12-2012 02:40 PM |
Inserting citations using the reference function in Microsoft Word 2007? | aeyara | Word | 0 | 09-28-2009 05:33 PM |