![]() |
|
#1
|
|||
|
|||
|
Hello,
I tried to change the macro below so that in one run it will delete an unnecessary space next to the + - signs Is it possible? I can duplicate the macro and put one mark per macro but that leaves me with a lot of shortcuts. Thanks Sub MFindReplacePARA() Dim aDoc As Document, strFindText As String, strReplaceText As String strFindText = "^p^p" strReplaceText = "^p" strFindText = " +" strReplaceText = "+" strFindText = "+ " strReplaceText = "+" strFindText = "- " strReplaceText = "-" strFindText = " -" strReplaceText = "-" For Each aDoc In Application.Documents With aDoc.Range.Find .Text = strFindText .Replacement.Text = strReplaceText .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = True .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False .Execute Replace:=wdReplaceAll End With Next aDoc End Sub |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Removing extra space between word | BillMcEnaney | Word | 9 | 02-16-2023 11:03 PM |
| How to delete extra space (between lines)? | Gerald Wilhelm | Word | 15 | 08-26-2020 04:08 AM |
Merge field needs extra space when it populates
|
jaj42305 | Mail Merge | 3 | 04-21-2016 03:33 PM |
| extra space before equation | Nice2007 | Word | 1 | 04-27-2012 05:05 PM |
Slight extra space between lines.
|
lucadelcarlo | Word | 1 | 04-23-2011 04:05 PM |