Hi

I'm hoping someone will have an easy answer to this problem but I realise it's a bit odd.

I am building a template which could potentially generate up to 15 different letters to various individuals all on the one topic. Each of the 15 letters is contained within the one document, separated by section breaks.

A1 B1 C1 D1 E1 F1 G1
A2 D2 E2 F2 G2
A3 D3
D4

In the past I have been able to code define a range where X is the page number I want to delete:-

Set oRng = ActiveDocument.Sections(X).Range
oRng.MoveStart wdCharacter -1
oRng.Delete
I am now faced however with a dilemma when trying to work out the various combinations of letters depending on true and false values selected by the user.

For example

A1-A3 always appear and so I've put these at the start of the document so that their range values will not change.
B1 is optional
C1 is optional
D1 - D4 are optional. However, if D1 is not selected then D2 - D4 are not available, if D2 is not selected, D3-D4 are not available etc.
The same applies to E, F & G - if option one is not selected then option two cannot be selected independently.

Is there a way to code to cover off every potential combination on the basis of the above rules and to delete the ranges of the pages which are giving false values? I'm afraid I'm just not good enough with VBA to work this out on my own (and I've been trying for days).

Any assistance anyone is willing to offer would be of great help to me.

Thanks

Dav