R
Raul
I recorded the following macro to select the whole document, align center,
and then align left. The objective is to remove all "leading" tabs (tabs
that preceed anything in that paragraph). The problem is the macro does not
work as intended. It does select the whole story, it does align center, and
then it aligns left but retains all the leftmost tabs.
Sub RemoveLeftmostTabs()
'
Selection.WholeStory
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
When I manually use CNTRL+A to select the whole story, use CNTRL+E to align
center, and CNTRL+L to align left, Word does what I want.
What am I missing?
Thanks in advance,
Raul
and then align left. The objective is to remove all "leading" tabs (tabs
that preceed anything in that paragraph). The problem is the macro does not
work as intended. It does select the whole story, it does align center, and
then it aligns left but retains all the leftmost tabs.
Sub RemoveLeftmostTabs()
'
Selection.WholeStory
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End Sub
When I manually use CNTRL+A to select the whole story, use CNTRL+E to align
center, and CNTRL+L to align left, Word does what I want.
What am I missing?
Thanks in advance,
Raul