#1
|
|||
|
|||
Insert page automatically
Is there a way to insert a page based off a field.
I have a template that when open prompts one to type in something, and then what you type is added to a field on the first page. I am trying to find a way so that when something is typed in, it inserts a corresponding page as well as into the field on the first page. (i.e. the word "manhole" would show up one the first page, and populate pages that have the information on proper safety procedures with manholes.) Is there a way to do this? Last edited by Glitch; 07-30-2018 at 11:50 AM. Reason: Clarity |
#2
|
|||
|
|||
Yes. BUT why?
What you are describing just appears to be a hidden 'Table of Contents'. Why would you ask someone to type something in when you can provide an alphabetical list of hyperlinks to documents you have already created. |
#3
|
|||
|
|||
I create a book for every job that has what material is being used and how to do so, that book is printed off and bound and sent to contractors. Hyperlinks would not work in this situation as I am not allowed to refer to a master book or website. We have procedures for installing a large number of different parts, and it would be unnecessary to provide pages on all them when only a few are used.
|
#4
|
|||
|
|||
It will depend very much on where the information used to populate the pages is stored.
Can you enlighten us. However, based on your input so far I suspect you really need a formal BOM (Bill of materials) generator rather than an ad hoc set of Word macros. |
#5
|
|||
|
|||
in the file
While I could put it anywhere currently it is located in
C:\Spec Book I am trying to make the end product one page where information is filled in from fields, then the next pages would be a bill of materials, followed by paper work that corresponds to each material, and finally some basic details that go in all of the books at the end. I currently have the fields being filled in through a prompt when you first open. |
#6
|
||||
|
||||
Your description suggests you might be better off creating an Excel workbook with columns & headings for the different elements, and rows for the different categories, then using that as a mailmerge datasource from which you can create a document by applying a category filter.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
Code:
C:\Spec Book Is this assumption correct? |
#8
|
|||
|
|||
all in one document
Thank you so much for the quick and thorough responses.
Slaycock, Yes it is all in one book. Do I need to break it up? Macropod, you may be correct in using excel instead of word, I am still unable to automate inserting pages in excel or in word. I have not seen a way to do that in Mail merge, could you direct me? |
#9
|
||||
|
||||
The Word side of that's as simple as using an IF test and inserting the entire page's content into the True or False result, as appropriate. For example:
{IF{MERGEFIELD Condition}= "True" "Conditional text"} Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. The spaces represented in the field constructions are all required.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
That was it!!! Thank you so much, I was unaware one could use IF functions in word. I added the Trim command to disregard any capitol letters, the end result was :
{ If {TRIM "myfield"}="Manhole" "MANHOLE DATA SHEET ..."} Thank you again! |
#11
|
||||
|
||||
There is no 'TRIM' field or field switch, so I have no idea what you're doing there. Try:
{IF{MERGEFIELD myfield \* lower}= "manhole" "MANHOLE DATA SHEET"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
automatic, field, insert page |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
I need a macro to automatically insert 4 pics per page in a word document with "Photograph No 1, 2," | NewbieLearning | Word VBA | 15 | 11-14-2017 05:03 AM |
Insert Filename automatically when open | vicmar | Word VBA | 8 | 08-31-2017 02:49 AM |
Automatically insert the name of the user | MiniMum97 | Word | 1 | 04-12-2016 03:40 AM |
automatically insert an image into a document | hanrattyc | Word | 1 | 05-13-2013 04:27 PM |
How to automatically insert DAY instead of date? | kylera | Word | 3 | 06-28-2012 12:38 PM |