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 glacially slow, but it's far from blazing fast, and seeing that something is progressing makes the experience tolerable. (BTW, assigning the paragraph count up front to the variable
j is done to keep things from slowing down even further by having to call
oSource.Paragraphs.Count every time the ''StatusBar“ line is executed.)