B
Bad at VBA
I'm not quite understanding how to control where text will be inserted
when using a macro.
I'd like to insert text after a particular heading in a bunch of
documents. I know that the heading will use style Heading 1, and I
know the section will be called "Test".
So what I was thinking was that I'd search for the style and the text,
and then use the Selection.InsertParagraphAfter to insert my text.
And while this works in that it finds the text, I'm not sure how to
place the insertion point after the found text. It always inserts at
the top of the document.
Is what I'm trying to do possible, or am I just going after it the
wrong way?
The documents are structured similar to:
INTRODUCTION
Some text
DESCRIPTION
Some text
TEST
Some text
What I want to do is insert new text after TEST and before "Some
text".
Any help would be greatly appreciated!
when using a macro.
I'd like to insert text after a particular heading in a bunch of
documents. I know that the heading will use style Heading 1, and I
know the section will be called "Test".
So what I was thinking was that I'd search for the style and the text,
and then use the Selection.InsertParagraphAfter to insert my text.
And while this works in that it finds the text, I'm not sure how to
place the insertion point after the found text. It always inserts at
the top of the document.
Is what I'm trying to do possible, or am I just going after it the
wrong way?
The documents are structured similar to:
INTRODUCTION
Some text
DESCRIPTION
Some text
TEST
Some text
What I want to do is insert new text after TEST and before "Some
text".
Any help would be greatly appreciated!