This is an old revision of the document!
As it turns out, I have a client who really, really does not like to see justified text in the documents I send him. This used to eat a certain amount of time during the post-translation phase, as the folks who put together the source document mix justified with left-aligned with centered, with a dash of right-alignment to round things off.
So it was only natural for me to finally sit down and write a Word macro that, basically, goes through each paragraph within a document and changes only those with justified text to display as left-aligned. Check it out:
Sub ChangeJustifiedToLeft() Dim oSource As Document Set oSource = ActiveDocument j = oSource.Paragraphs.Count For i = 1 To j StatusBar = "Processing " & i & " of " & j If oSource.Paragraphs(i).Format.Alignment = wdAlignParagraphJustify Then oSource.Paragraphs(i).Format.Alignment = wdAlignParagraphLeft End If Next i End Sub
StatusBar line is there to provide some visual feedback as the macro works its way through a file. Execution is not objectionably slow, but it's far from blazing fast. (Assigning the paragraph count to the variable
j is done to keep things from slowing down even further by having to call
oSource.Paragraphs.Count for each value of