L
Liza
Hi
Background:
---------------
We have an upcoming customer project for which we'll need to keep lots
of separate small(ish) Word documents edited by different users. Some
or all of these will at times need to be combined into one single
Final Document. The Final Document can be produced for Internal use or
for end-customer use and will need different headers/footers and fonts
in each case.
A database system will track which particular documents are required
for any Final Document. This system will output the ordered list of
filenames as variables in various ways - as a CSV list, or as separate
lines in a text file, or any way you recommend.
Requirement:
-----------------
I think we can deal with the need for different headers/fonts etc by
setting up several Templates with the right settings.
So what we then need is a macro (preferably run from outside Word)
which will:
* create a new document using a specified template
* Loop through the list of filename variables and do an Insert File
for each one.
* Save the document after all the files have been read in.
I am not a VB coder, and although I can of course record a Word macro
inserting specific files, I don't know how to approach this more
abstract requirement.
If anyone has code to do this, I would be very grateful to see it.
----------------
Also - is it possible to read variables into a Word Header in any
similar way? So that the values in the header can be populated from
data in the database.
Thanks in advance
Liza
Background:
---------------
We have an upcoming customer project for which we'll need to keep lots
of separate small(ish) Word documents edited by different users. Some
or all of these will at times need to be combined into one single
Final Document. The Final Document can be produced for Internal use or
for end-customer use and will need different headers/footers and fonts
in each case.
A database system will track which particular documents are required
for any Final Document. This system will output the ordered list of
filenames as variables in various ways - as a CSV list, or as separate
lines in a text file, or any way you recommend.
Requirement:
-----------------
I think we can deal with the need for different headers/fonts etc by
setting up several Templates with the right settings.
So what we then need is a macro (preferably run from outside Word)
which will:
* create a new document using a specified template
* Loop through the list of filename variables and do an Insert File
for each one.
* Save the document after all the files have been read in.
I am not a VB coder, and although I can of course record a Word macro
inserting specific files, I don't know how to approach this more
abstract requirement.
If anyone has code to do this, I would be very grateful to see it.
----------------
Also - is it possible to read variables into a Word Header in any
similar way? So that the values in the header can be populated from
data in the database.
Thanks in advance
Liza