![]() |
#1
|
|||
|
|||
![]()
Upper management on my project has directed us to use two spaces after periods (next they'll be re-issuing IBM Selectrics!).
I've created a macro to add 2 spaces after periods and colons. But now need to create one that adds 2 spaces after a closing parenthesis within a paragraph. For example, if there is a (See Section X.) within a paragraph -- not at the end. I recorded a macro using Replace, which worked when I recorded it, but gives a "The Find What text contains a Pattern Match expression which is not valid." I'm sure it's the ), but don't know what to do to omake the macro do what I want. Here's the recorded code: 'Places 2 spaces after a closing parenthesis ")" within lines of text Selection.Find.ClearFormatting Selection.Find.Replacement.ClearFormatting With Selection.Find .Text = ") " .Replacement.Text = ") " .Forward = True .Wrap = wdFindContinue End With Selection.Find.Execute Replace:=wdReplaceAll I'd appreciate suggestions. |
Tags |
problem with macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple VBA macro error | Formulayeti | PowerPoint | 1 | 12-09-2011 10:02 PM |
![]() |
tinfanide | Excel Programming | 5 | 12-03-2011 12:53 AM |
Macro Error 5174 | muster36 | Word VBA | 0 | 08-12-2011 03:34 AM |
Word doc bug when closing from userform command button click macro | Joe Patrick | Word | 1 | 07-05-2011 08:53 PM |
Error On Closing Program - Outlook 2000 | sheepy11 | Outlook | 0 | 01-08-2006 08:39 AM |