Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-10-2019, 04:52 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default 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 one
and the page 1 for another document might be:
Reinsert me because I have super powers - I am page one of another document
Thank you I kind of think a macro that works in the active document.
Reply With Quote
  #2  
Old 06-10-2019, 05:02 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default

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.
Reply With Quote
  #3  
Old 06-10-2019, 06:17 PM
eduzs eduzs is offline Word macro Windows 10 Word macro Office 2010 32bit
Expert
 
Join Date: May 2017
Posts: 260
eduzs is on a distinguished road
Default

For me, it is not clear the logic of defining what the first page text will be.
Where's the texts stored?
Reply With Quote
  #4  
Old 06-10-2019, 09:34 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default

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.
Reply With Quote
  #5  
Old 06-10-2019, 10:17 PM
Guessed's Avatar
Guessed Guessed is offline Word macro Windows 10 Word macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #6  
Old 06-10-2019, 10:21 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
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).
Thanks so much Guessed - while I don't know anything about your response, at least I know it can be done I'm very grateful
Reply With Quote
  #7  
Old 06-10-2019, 10:26 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default

Actually Guessed I know exactly what you mean - thank you so much
Reply With Quote
  #8  
Old 06-11-2019, 04:32 AM
Guessed's Avatar
Guessed Guessed is offline Word macro Windows 10 Word macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #9  
Old 06-11-2019, 01:59 PM
Railea Railea is offline Word macro Windows 10 Word macro Office 2010
Novice
Word macro
 
Join Date: Jun 2019
Posts: 6
Railea is on a distinguished road
Default

Thank you so much. I will let you know how I go over the next day or so
Reply With Quote
Reply

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
Word macro 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 macro Word 2003 Macro problem running in Word 2010 norwood Word VBA 2 02-03-2014 06:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:57 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft