#1
|
|||
|
|||
Word macro
Hi everyone,
I've looked around and can't find anything on this. I have a bunch of documents. The first page has fields in it, that autopopulate in the rest of the document: so by bookmarks and ref fields. That first page needs to be deleted once the document is complete - that part is also done. I need to be able to reinstate the first page, and that's easy enough. My question is: If the first page is different in EVERY document, how do I either save it as autotext that is only available in each document, or some other way. All help would be greatly appreciated. Thank you. If that isn't clear, what I need is a macro that somehow inserts the page 1 of each document: first instance, page one in the first document might be: Reinsert me - I am page oneand the page 1 for another document might be: Reinsert me because I have super powers - I am page one of another documentThank you I kind of think a macro that works in the active document. |
#2
|
|||
|
|||
I should have mentioned that there is a section break from page 1 to page 2, and the section break needs to be part of the macro as well as the text.
|
#3
|
|||
|
|||
For me, it is not clear the logic of defining what the first page text will be.
Where's the texts stored?
__________________
Backup your original file before doing any modification. |
#4
|
|||
|
|||
Yep, sure I can see I wasn't very specific. Okay, the document as a whole is a proposal with various variables in it.
The first page of that document contains a table where users can fill out all the variables. So the text I want to be able to restore is the first page (the variable table) and the section break. Once that's done, there's a macro that updates all the fields, and deletes the first page (simply for cosmetic purposes). However, I've had a couple of users say that if they wanted to change variables, they would want that first page back. So I put it in autotext and that works fine. Except there are about 20 documents in all and all the first pages are different. I want a macro that will allow me to do this for all the documents. Simply using the autotext function won't work except for the first time it's used. It seems really cumbersome to have 20 different autotexts - actually I can't think of a way that would work with the same macro anyway. Sorry if I'm not clear. |
#5
|
||||
|
||||
Your workflow can't work with Bookmarks and Ref fields. If the bookmarks exist on the first page, the ref fields are fine but as soon as you delete the cover page, the bookmarks no longer exist and the Ref fields will all break (when next updated).
This task should be done with linked content controls. This way, the values of each linked CC are stored in an embedded xml file. The cover can be stored as a building block and inserted in each doc and the values in each CC will reflect the values stored in the xml file (and hence be relative to the document where the CC is inserted).
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#6
|
|||
|
|||
Quote:
|
#7
|
|||
|
|||
Actually Guessed I know exactly what you mean - thank you so much
|
#8
|
||||
|
||||
You should use the CC tools developed by either Greg Maxey or Graham Mayor.
Post a sample doc if you need help to get it set up.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#9
|
|||
|
|||
Thank you so much. I will let you know how I go over the next day or so
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to transfer data from Word to another Word document with bookmark | Jovan Yong | Word VBA | 3 | 04-17-2018 04:27 AM |
Macro to put 1 word of a MS Word file in 1 cell of a Word or Excel Table | Singh_Edm | Word VBA | 6 | 11-13-2015 08:48 PM |
Convert Word 2007 macro to work in Word 2003 | Kamaflage | Word VBA | 1 | 02-25-2015 11:40 PM |
Macro Question: Need help making a macro to highlight the first word in every sentence | LadyAna | Word | 1 | 12-06-2014 10:39 PM |
Word 2003 Macro problem running in Word 2010 | norwood | Word VBA | 2 | 02-03-2014 06:49 PM |