Any Microsoft Word gurus out there?

Hi folks,

I’m wondering if there are any Word experts out there who can point me in the right direction :slight_smile:

**The background
**
Where I work, we have a “Technical Requirements” document. A bespoke version of this is completed for every customer project we do, and they can run from a few pages to tens of pages depending on the comlexity of the project. Although each requirements document is unique, we use a standard template for consistency. I’ve been given the job of sorting out that template, and making it a bit more fit for purpose.

Our projects consist of any one of five “technical areas”, and the structure of the document is as follows:

[ul]
[li]1: Intro (generic stuff - this section will appear in every document, and is mostly boilerplate)[/li][li]2: Project Overview - this would be written from scratch each time and defines the scope of the project[/li][li]3A: Technology Area 1 details - this would only appear if technology area 1 forms part of the scope[/li][li]3B: Technology Area 2 details - this would only appear if technology area 2 forms part of the scope[/li][li]3C: Technology Area 3 details - this would only appear if technology area 3 forms part of the scope[/li][li]3D: Technology Area 4 details - this would only appear if technology area 4 forms part of the scope[/li][li]3E: Technology Area 5 details - this would only appear if technology area 5 forms part of the scope[/li][/ul]

Given that our projects can consist of any combination of technology areas, it’s difficult to create a Word template which could satisfy all requirements at once. We currently spend a lot of time simply editing the template each time we want to produce one of these documents, taking out all the the redundant bits.

**At last… the question!
**
I’d really to set up some sort of macro which will execute when someone opens the template, and present the user with check boxes asking “which technology areas will be in this project?” The idea is that once they’ve selected the relevant choices, the macro would produce the only those sections which need to be there, thus leaving the user with a framework document tailored to their solution.

As an example, I may be working on a project which only uses technology areas 1 and 3. By checking the appropriate boxes, the document would then Look like this: Section 1 > Section 2 > Section 3A > Section 3C. The redundant bits wouldn’t appear.

How could this best be achieved? I’ve got minimal coding skills (I know what a variable is, understand looping and decision making concepts, and I’ve played with Visual Basic a little). What I don’t understand is where the template would store the text for each section - or would you have all the text in the document and delete the unwanted sections based on the options the user checks?

Any advice welcome!

Thanks,

TwoCarrotSnowman

Instead of faffing around with macros, why not go the master document & subdocument route? Then you just delete the links to the inappropriate subdocuments. This would also make it easier for each technology area to update their parts.

Quartz’s suggestion is probably easiest, but if you really want to take the checkbox form route, I’d recommend putting all the text in the template and having the macro delete sections. You can define the sections with bookmarks (select the entire section as the bookmark), then use the following to delete it.


ActiveDocument.Bookmarks("TechArea1").Range.Delete

Thanks guys… I think the checkbox route is better for our particular circumstances. I’ve got a simple prototype up and working using bookmarks as per the code above - so thanks very much indeed. :slight_smile: