#1
|
|||
|
|||
macro for copying fields in ms word template
Hi,
I am trying to make a word template which would copy content of some fields when filled in to another fields in the same document. Now, I can make a locked template with fields for variable content and I have found out that for each field I can set a macro which will run upon leaving the field in question. However, I havenīt been able to find out which macro I should use simply to copy the content of the field to another field (and possibly to more fields at once). Could anyone help me out, please? Alternatively, if you do have better idea how to make creation of standardized documents with some variable content that is often repeated throughout the document easier , Iīm all ears! Thank you very much in advance! |
#2
|
||||
|
||||
To what kind of fields do you refer: formfields or content controls?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
See Repeating Data (Populating Multiple Like Fields).
There are a lot of ways of doing what you want and few require macros. The article is long because there are a lot of ways. I urge you to read through it. |
#4
|
|||
|
|||
Thank you very much, this was most helpful! Iīve been able to do what I wanted using simple REF fields.
However, could I ask for a little more help? I canīt determine different formats (e.g. different font or different size, bold, italics etc.) of different copies (and for that matter, neither the format of the original fields), could you help me with that as well, please? Thanks again! |
#5
|
|||
|
|||
Avoid the MergeFormat switch and look into the CharFormat switch in your Ref field.
Using Fields in Microsoft Word |
#6
|
|||
|
|||
Thanks again, I appreciate your help very much - it works!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error 5941 when running my macro to auto populate fields throughout the word doc | VBAnovice1 | Word VBA | 2 | 05-26-2015 01:35 AM |
Word 2010 Macro Enabled Template with Content Controls | keen1598 | Word VBA | 7 | 01-29-2014 03:17 PM |
Date fields calculations in Word Template. | kckay | Word | 1 | 10-22-2012 11:34 PM |
Word template containing macro + hotkeys | b0x4it | Word | 4 | 05-19-2011 06:37 PM |
Rookie question: auto-copying fields | reviewboy | Word | 1 | 12-04-2009 11:22 AM |