![]() |
|
#2
|
|||
|
|||
|
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey Dim oRng As Range Set oRng = ActiveDocument.Range With oRng.Find .Text = " " .Wrap = wdFindStop While .Execute oRng.Select If MsgBox("Do you want to convert selected text to a single space.", vbYesNo, "Conver") = vbYes Then oRng.Text = " " oRng.Collapse wdCollapseEnd End If Wend End With lbl_Exit: Exit Sub End Sub |
| Tags |
| vba |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Is there a way to go to the next selection?
|
wardw | Word | 2 | 09-25-2019 09:19 AM |
| This is not a valid selection | edenworkshops | Word | 3 | 09-18-2019 05:43 AM |
Selection.Bookmarks("\headinglevel") WITHOUT Selection
|
NobodysPerfect | Word VBA | 3 | 01-14-2015 12:58 PM |
Selection of all Text for a specific page in word is spanning selection across pages
|
ramsgarla | Word VBA | 9 | 12-05-2012 03:23 AM |
| How do you add to a selection list? | bryanarn | Excel | 2 | 03-05-2012 05:04 PM |