Formatting lost when doing an iterative insert + file on Word docs

G

Ganeth

I'm generating a 'master' document (although NOT with Word's inbuilt Master Document functionality) from approx 400 other documents. Each document is quite intricately formatted, and this formatting is important to the readability of the documents. When I run my macro to compile the master doc, I lose a great deal of this formatting. Inserting a continuous section break at the beginning and end of each document to be inserted has NOT solved the problem, and neither has adopting a copy and paste approach instead. The precise problems I'm facing are

- Each document contains bulletted text. Some of these entries have been indented further than they should be. (Now, if worst comes to worst, I can write a function to correct this problem on a page by page basis (all the pages have exactly the same headings, etc, which I can use to get to the bullets and correct them), but it'll be a pain and require that I review the documents afterwards to make sure it worked correctly

- Each documents finishes with a heading 2 line. Immediately following this line, there is always a series of instructions formatted as outline numbering

[heading 2]1.13 - How is this process performed if you can be bothered?[/heading 2
1 For each document received from the bamboozling section
1.1 Spill some coffee on i
1.2 Draw a small picture of a frog on it
[bullet] The frog must be gree
[bullet] But not kermi
1.3 Shove it in the bi
2 Go home for the da

There's space above and below each entry, etc, but that's how it should appear. Anyways, this is getting totally fubared, the numbering is sometimes starting from 0, sometimes not, sometimes the last entry has been de-numbered, first line indents are being added to the bullets for no good reason, etc

Those are the two problems I really must sort out. Like I say, inserting continuous section breaks at the start and end of each doc to be inserted has not worked. I'm on the verge of switching to acrobat for the whole project

Many thanks in advance for your assistance

Gareth
 
P

Peter Hewett

Hi Ganeth

When compiling documents of this type to retain the correct formatting *all* of them must
have been created from the same template. In turn that template should also be used to
create the new document all of the other documents are merged into. The problem you have
encountered is the good old Word gotcha of List Numbering. List numbering has to be set
up correctly in the base template (the links at the end of this post describe exactly how)
and *all* documents must then be created from the base template. You can't just attach an
existing document to the base template. This will *not* work as the List Gallery entries
that are responsible for this problem will not change.

If you want your solution to work reliably this is the *only* approach that will work
correctly all of the time. I've built many document assembly Wizards for my clients over
the years and this is the only approach that works consistently.

I recently had to reformat about 100 documents for a client (approximately 600 pages) for
use with a Wizard. I wrote code to handle the bulk of this. I ended up writing some
1800+ lines of code for this, but most of it is just the verbose list setup. I wont post
the code as it was specific to the documents I was converting. I wrote chunks of code to
address specific conversion problems and ran multiple conversion passes over the
documents. This incremental approach makes it easier to manage the conversion exercise.

Here's some links for setting up List Numbering (which includes bullets) correctly:
http://www.shaunakelly.com/word/numbering/OutlineNumbering.html

HTH + Cheers - Peter


I'm generating a 'master' document (although NOT with Word's inbuilt Master Document functionality) from approx 400 other documents. Each document is quite intricately formatted, and this formatting is important to the readability of the documents. When I run my macro to compile the master doc, I lose a great deal of this formatting. Inserting a continuous section break at the beginning and end of each document to be inserted has NOT solved the problem, and neither has adopting a copy and paste approach instead. The precise problems I'm facing are:

- Each document contains bulletted text. Some of these entries have been indented further than they should be. (Now, if worst comes to worst, I can write a function to correct this problem on a page by page basis (all the pages have exactly the same headings, etc, which I can use to get to the bullets and correct them), but it'll be a pain and require that I review the documents afterwards to make sure it worked correctly)

- Each documents finishes with a heading 2 line. Immediately following this line, there is always a series of instructions formatted as outline numbering:

[heading 2]1.13 - How is this process performed if you can be bothered?[/heading 2]
1 For each document received from the bamboozling section:
1.1 Spill some coffee on it
1.2 Draw a small picture of a frog on it:
[bullet] The frog must be green
[bullet] But not kermit
1.3 Shove it in the bin
2 Go home for the day

There's space above and below each entry, etc, but that's how it should appear. Anyways, this is getting totally fubared, the numbering is sometimes starting from 0, sometimes not, sometimes the last entry has been de-numbered, first line indents are being added to the bullets for no good reason, etc.

Those are the two problems I really must sort out. Like I say, inserting continuous section breaks at the start and end of each doc to be inserted has not worked. I'm on the verge of switching to acrobat for the whole project.

Many thanks in advance for your assistance,

Gareth
 
G

Ganeth

Yes, that does help, thank you. It's a bit late to implement your advice re setting up a base template, but I think I can write something that'll homogenise all the documents to be inserted (they are all - almost - based on the same template, only documents generated at the beginning of this project are markedly different). In this case, almost right is good enough - I can afford to spend an hour or two manually correcting the most glaring errors

Based upon this, I think that an important lesson is to develop and finalise a document template BEFORE embarking on any major documentation project, and then DO NOT CHANGE IT when generating subsequent docs. (No doubt such advice was readily available, had I bestirred myself to research how to undertake a technical writing project before starting one). The template I used has only had two or three minor revisions, but that's been enough to make it very difficult to compile a master document. (Or alternatively, don't hire a web developer like me to write tech docs ;-)

Thanks again

Ganeth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top