H
hjdietmann
My Word document consists of several headings with subtext. I want to
find all headings (with the built-in heading style "Heading 4") that
contain a specific keyword (e.g. "TEST") and delete all text under
this heading.
In the example below, I want to delete heading 1.1.1.1 and 1.1.1.3
including the subtext.
In outline view mode, would click on the "+" tag, which highlights the
heading and press the del key.
+ 1.1.1.1 -> TEST - Heading
. Text line 1
. Text line 2
. more text
+ 1.1.1.2 -> Next Heading
. Text line 3
+ 1.1.1.3 -> TEST - Next Heading
. Text line 4
How can this be done by a VBA macro?
Thanks for any help.
Hans
find all headings (with the built-in heading style "Heading 4") that
contain a specific keyword (e.g. "TEST") and delete all text under
this heading.
In the example below, I want to delete heading 1.1.1.1 and 1.1.1.3
including the subtext.
In outline view mode, would click on the "+" tag, which highlights the
heading and press the del key.
+ 1.1.1.1 -> TEST - Heading
. Text line 1
. Text line 2
. more text
+ 1.1.1.2 -> Next Heading
. Text line 3
+ 1.1.1.3 -> TEST - Next Heading
. Text line 4
How can this be done by a VBA macro?
Thanks for any help.
Hans