A few questions:
a. Which version of Word (not necessarily relevant but may be worth
knowing!)
b. Can you clarify the structure a bit:
- I didn't understand what you mean by "included page numbers". Is it a
table of contents of some kind with page references, or do you want to
deduce start/end page numbers depending on how many forms are used in some
future version of your document?
- after page 3 do you have
page 4
page 5 containing a diagram
page 6 containing a diagram
page 7 containing a diagram
page 8 (like page 4 ("duplicate") except for the page number
page 9 containing a diagram
page 10 containing a diagram
page 11 containing a diagram
etc.
or what?
c. are the diagrams you use in pages 5-7, 9-11 etc. in separate image
files, or in Word files, and do they have consistent names that would, for
example, allow you to say "use file xyz296.jpg on page 96".
d. assuming that you want to automate because things will change and you
need to produce a new version, what kind of things are likely to change? The
diagrams? The number of diagrams? etc.
All that said, I'd say the simplest way to automate this would be to create
a number of skeleton documents (or even Word .dot templates) , probably for
pages 1-3, then one for each batch of diagrams (4-7, 8-11 if I got it
right). Then use some code in a VBA loop to generate 40 sets of output
directly, using the relationship between files names and set/page names to
insert the relevant diagram in the right place, and if necesary, to stuff
the right info into page 1.
Alternatively you could split into pages 1-3 and the rest, but use a
mailmerge to generate 40 copies of pages 4-7. Your data source might have
something like
No Diag1 Diag2 Diag3
1 forma.jpg formb.jpg formc.jpg
etc.
and your mail merge main document would need to use INCLUDEPICTURE fields to
include the correct images. You would probably need to do some stuff to fix
up page numbering at the end (which is one reason why doin git all in VBA
without Mailmerge seems like a better bet to me).
Sorry, it's difficult to be more specific without understanding more about
what you are attempting.
--
Peter Jamieson
MS Word MVP
Tonyk said:
I am trying to automate production of a book of forms. Page 1 is the title
of book and shows included page numbers (i.e. 121-161), page 2 and 3 are
instructions, then follow 40 duplicate sequentially numbered pages followed
by three pages of diagrams for photocopying.
I can create the pages all individually and manually put them together but
it would be nice to automate the process. Any pointers in the right
direction would be much appreciated.