![]() |
#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 |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wardw | Word | 2 | 09-25-2019 09:19 AM |
This is not a valid selection | edenworkshops | Word | 3 | 09-18-2019 05:43 AM |
![]() |
NobodysPerfect | Word VBA | 3 | 01-14-2015 12:58 PM |
![]() |
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 |