get the alignment of the selection

S

Sjef

Hallo,
in a macro I want to detect the alignment of a selection. When a new page
break has been set I want to change the alignment (from left to right and
back).
This is the code I thought should do the trick. But it does not :-((
What's wrong. Any ideas. Thanxs!!

If Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft Then
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Else
Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top