I have recorded a macro to remove all paragraphs from a document. I would like a macro with which I can remove them from only selected text. This is useful when I receive a document with an included paragraph or more pasted from teh web or a text document, with hard line returns on all lines.
However, even though I select some text before recording the macro, it invariably operates on the entire document. I know that some macros can operate on only a selection -- I have recorded several -- but I can make sense out of the differences. The language in my recording mirrors that in ones that operate globally on the document, starting with
Code:
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
(although some of my macros start with Selection.WholeStory)
and end with
Code:
Selection.Find.Execute Replace:=wdReplaceAll
Every time I try to look up VBA terms, I get completely frustrated by the vast realm thereby encompassed.
I know this is really basic for anyone who has learned programming.
Thanks.