W
wordproc
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:
Sub strip()
Selection.WholeStory
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
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 accomplish these three steps in VBA?
Ctrl+A
Align Center
Align Left
I recorded a macro of these same steps which reads:
Sub strip()
Selection.WholeStory
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
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 accomplish these three steps in VBA?