Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I would like to take several word documents and collate them into one. I'm wondering if there is a way to use templates, form fields, macros, etc to streamline this process.

We have several team status reports like this one:


Status Report
7 October – 13 October 2012
Team 1
Department

Category 1

Job 1 – The team did a lot of stuff and worked hard on this job. (J. Doe)

Job 2 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Smith)

Category 2

Job 3 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Smith)

Job 4 – The team did a lot of stuff and worked hard on this job. (J. Smith)

Category 3

Job 5 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Johnson)

Job 6 – The team did a lot of stuff and worked hard on this job. (J. Doe, B. Smith, J. Smith)

Upcoming Meetings

October

November

December

3-7 – Team 1 meeting with the customer
24-28 – Mandatory Team 1 week long status meeting

Other Upcoming Events

19 - 30 November - Important Conference

Vacation

31 October – John Doe


And they need to end up as one department-wide status report like this one:


Status Report
7 October – 13 October 2012
Department

Category 1

* Team 1 *

Job 1 – The team did a lot of stuff and worked hard on this job. (J. Doe)

Job 2 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Smith)

* Team 2 *

Job A – The team did a lot of stuff and worked hard on this job. (G. Doe)

Job B – The team did a lot of stuff and worked hard on this job. (G. Doe, G. Smith)

Category 2

* Team 1 *

Job 3 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Smith)

Job 4 – The team did a lot of stuff and worked hard on this job. (J. Smith)

Category 3

* Team 1 *

Job 5 – The team did a lot of stuff and worked hard on this job. (J. Doe, J. Johnson)

Job 6 – The team did a lot of stuff and worked hard on this job. (J. Doe, B. Smith, J. Smith)

* Team 2 *

Job C – The team did a lot of stuff and worked hard on this job. (G. Doe)

Job D – The team did a lot of stuff and worked hard on this job. (G. Doe, G. Smith)

Upcoming Meetings

October

November

December

3-7 – Team 1 meeting with the customer
10-14 – Team 2 meeting with the customer
24-28 – Mandatory Team 1 week long status meeting

Other Upcoming Events

19 - 30 November - Important Conference

Vacation

30 October – Gene Doe
31 October – John Doe


Can anyone help me figure out how to do this, or at least get me headed in the right direction?

share|improve this question

1 Answer 1

AFAIK Word doesn't support this "inverse mail marge" ;-). If the documents have the same style structure, it would be fairly easy to navigate in them with VBA, and generate custom Excel/Word report on the fly. But to make it happen would require a few hours of work.

If you have influence over the format of the templates, I'd suggest to use named bookmarks to mark those pieces of document, that you will want to extract later. It would also help, if you restrict formatting of the document, and permit editing only in the predefined bookmarked places.

You will need a code in VBA that would

  1. Iterate over all reports' filenames.
  2. On every iteration open the report,...
  3. ...iterate over all predifined bookmarks,...
  4. ...for each bookmark get the text (Bookmark.Range.Text) and ...
  5. ...and put it in the report.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.