T
Tilds
Im trying to make a macro that set alignment on all text to
wdAlignParagraphJustify, except text that is wdAlignParagraphCenter.
Right now i have this:
With ActiveDocument.Content.Find
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphRight
With .Replacement
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphJustify
End With
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphLeft
With .Replacement
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphJustify
End With
.Execute Replace:=wdReplaceAll
End With
This works, but I was hoping for a better solution since there apparently
exists alot more alignment constants then those two.
ActiveDocument.Content.Find.ParagraphFormat.Alignment <>
wdAlignParagraphCenter
doesnt work.
/Niels
wdAlignParagraphJustify, except text that is wdAlignParagraphCenter.
Right now i have this:
With ActiveDocument.Content.Find
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphRight
With .Replacement
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphJustify
End With
.Execute Replace:=wdReplaceAll
End With
With ActiveDocument.Content.Find
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphLeft
With .Replacement
.ClearFormatting
.ParagraphFormat.Alignment = wdAlignParagraphJustify
End With
.Execute Replace:=wdReplaceAll
End With
This works, but I was hoping for a better solution since there apparently
exists alot more alignment constants then those two.
ActiveDocument.Content.Find.ParagraphFormat.Alignment <>
wdAlignParagraphCenter
doesnt work.
/Niels