Home arrow Tips & Hints arrow Time Matters arrow Full Justify in a TM Formattable Clipboard
Full Justify in a TM Formattable Clipboard

OTBJustifyClip is a Word macro that solves the problem of not being able to use full justification in a Time Matters Formattable Clipboard (FC).

The Time Matters FC allows you to Left, Center, or Right justify a document. For example, the document below is from a FC that has titles that are Centered, Right and Left justified. The paragraph text is also Left justified, but we want that text to be Fully justified, a setting you can't set in a FC. Note that the text we want to be justified is enclosed in what we call Start and End tags, specifically: [FullStart] and [FullEnd].

Image

We love the TM FC feature and feel that with rare exceptions, there isn't much you can't do with it, so long as you are ready to roll up your sleeves, be creative, and be ready to use macros to accomplish what you want. Because we advocate the use of a macro to paste the FC into Word in the first place, why not use that same macro to clean the document up as well?

The following macro code justifies the text between the tags, but leaves all the other justification as it is:

Sub OTBJustifyClip()
'
' OTBJustifyClip
' Copyright 2009 - OTB Consulting
' Written by Thomas L. Rowe, Esq.
'
   
' Locate the text that is found between two Start and End tags.
' Check the entire document.
' When found, apply full justification

    Selection.Find.ClearFormatting
    With Selection.Find
        .Text = "\[FullStart\]*\[FullEnd\]"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
   
    While Selection.Find.Execute
        Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
        Selection.Find.ClearFormatting
        Selection.Find.Replacement.ClearFormatting
    Wend

' Once you have justified the text, need to get rid of the tags

    With Selection.Find
        .Text = "\[FullStart\]"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll
   
    With Selection.Find
        .Text = "\[FullEnd\]"
        .Replacement.Text = ""
        .Forward = True
        .Wrap = wdFindContinue
        .Format = False
        .MatchCase = False
        .MatchWholeWord = False
        .MatchAllWordForms = False
        .MatchSoundsLike = False
        .MatchWildcards = True
    End With
    Selection.Find.Execute Replace:=wdReplaceAll

End Sub

Here is the document after the macro has been run ... note that the paragraph text has been fully justified, but the titles retain their justification settings:

Image

We recommend that the macros be run from a toolbar, but that is a lesson for another day. Give this a try and you will have overcome one more FC limitation.

 
Next >

HomeAbout OTB | Services | ProductsPurchaseResources |Contact
Privacy & Use Policy
| Web Site Terms/Conditions

Copyright 2006 - 2008 - OTB Consulting - All rights reserved.
 LexisNexis is a registered trademark of Reed Elsevier Properties, Inc., used under license.  
Time Matters is a registered trademark and Billing Matters is a trademark of LexisNexis, a division of Reed Elsevier, Inc. 
All rights reserved.