I have a template that has 20 sections that I use daily and need to be able
to delete different sections each time. I am not sure what the best way
would be to set it up but I think that I would like to have a UserForm come
up when the document is opened that would list all of the sections with check
boxes by each. Then I could select the check boxes that go with each section
that I want to keep and then when I exit the user form all of the unchecked
items are deleted.
I am open to different suggestions if there is an easier way.
thanks alot for the help.
Russ - 09 Sep 2006 20:37 GMT
Shawn,
> I have a template that has 20 sections that I use daily and need to be able
> to delete different sections each time. I am not sure what the best way
[quoted text clipped - 5 lines]
>
> I am open to different suggestions if there is an easier way.
I think an easier way would be to set things up to be able to use Outline
view in Word. You would have the pseudo self-labeled sections that can be
expanded and collapsed for more focused viewing and when collapsed, can be
selected and deleted or moved around.
> thanks alot for the help.

Signature
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
rub - 10 Sep 2006 07:42 GMT
Won't something like this work:
Private Sub CommandButton1_Click()
Dim i As Integer
For i = 20 To 1
If CheckBox(i).Value = True Then
ActiveDocument.Sections(i).Range.Delete
End If
Next
End Sub
You would need to start at the end because once you delete a section
its section # changes.
> I have a template that has 20 sections that I use daily and need to be able
> to delete different sections each time. I am not sure what the best way
[quoted text clipped - 7 lines]
>
> thanks alot for the help.