I frequently strip leading/trailing spaces from text using:
Ctrl+A
Align Center
Align Left
I recorded a macro of these same steps which reads:
But when executed, all it does is Select All and stops, as if there are no other commands, leaving the text selected.
Does anyone know how to get these actions to work in a macro?
Ctrl+A
Align Center
Align Left
I recorded a macro of these same steps which reads:
Code:
Sub strip()
Selection.WholeStory
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
Does anyone know how to get these actions to work in a macro?