![]() |
#1
|
|||
|
|||
![]() 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 and end with Code:
Selection.Find.Execute Replace:=wdReplaceAll I know this is really basic for anyone who has learned programming. Thanks. |
#2
|
|||
|
|||
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
DobberHockey | Word VBA | 7 | 03-26-2012 09:26 PM |
Word 2000. Problem with Merriam-Webster Macro | M.Hat | Word | 2 | 12-29-2011 12:00 PM |
Simple VBA macro error | Formulayeti | PowerPoint | 1 | 12-09-2011 10:02 PM |
Problem with AutoClose macro and Word 2003 | cholo | Word VBA | 0 | 07-08-2009 05:48 AM |
Simple macro undoable? | garon5 | Outlook | 0 | 04-20-2007 10:27 AM |