Creating and Editing Letters

It sounds so easy: In theory, the Letter Wizard walks you step-by-step through the process of addressing, writing, and formatting a personal or business letter, with perfect results. In practice, the Letter Wizard and its connection to the Outlook Contacts list suffer from dozens of frustrating flaws—unless you know the secrets.

Tip from

Although you might think the Letter Wizard is about as straightforward as they come, you'll be surprised at what you don't know about this seemingly innocuous wizard. In this book, you'll find some of its quirks documented for the first time—anywhere.


Using the Letter Wizard

The key to making the Word Letter Wizard generate decent-looking letters lies in understanding what it can and cannot do, and how it interacts with the letter itself.

The least effective way to use the Letter Wizard is to start with a blank document and choose Tools, Letters and Mailings, Letter Wizard. The results, as shown in Figure 16.14, will surely be unsatisfactory—even if you choose a superb custom template in the Choose a Page Design box.

Figure 16.14. When you run the Letter Wizard on a blank document, the wizard throws away almost all the contents of the template you choose, generating an amateurish-looking letter.


Be vigilant: Word can trick you into running the Letter Wizard on a blank (or nearly blank) document in any number of ways. If you type Dear John, for example, the Office Assistant might pop up and ask whether it can help you type a letter. Say yes, and you'll be running the Letter Wizard on a nearly blank document. If you select an item in Outlook's Contacts folder and choose Actions, New Letter to Contact, you'll end up running the Letter Wizard on a blank document. If you choose File, New, choose General Templates, and pick the Letter Wizard from the Letters & Faxes tab, once again you'll end up running the Letter Wizard on a blank document. All these approaches doom you to a poorly constructed, amateurish letter.

Tip from

The only way to get a professional-looking letter out of Word's Letter Wizard is to start with a document that's been specifically designed to work with the Letter Wizard. The three templates on the Letter Format tab include all the right elements, but you need to replace generic text and graphics with your own content for best results.


The fundamental trick to using the Letter Wizard is this: Create a new document first—one that is specifically designed to work with the Letter Wizard. Then run the Letter Wizard.

Word ships with three templates that produce documents for use with the Letter Wizard. To see what they'll do, choose File, New, General Templates; click the Letters Format tab; and pick Contemporary Letter, Elegant Letter, or Professional Letter. Click OK to create the new document, and then click anywhere within the document itself and choose Tools, Letters and Mailings, Letter Wizard.

As you can see from the Letter Wizard's Recipient Info tab shown in Figure 16.15, the Letter Wizard actually picks up information from the letter itself—in this case the Dear Sir or Madam: salutation generated by the Elegant Letter template—and presents that information in the Letter Wizard dialog box.

Figure 16.15. The Letter Wizard picks up text from the letter template, such as the salutation shown here.


Tip from

If you create a template that's designed to be used with the Letter Wizard, you can have Word run the Letter Wizard immediately after creating a new document based on the template. Create a Document_New() macro with this line:

    ActiveDocument.RunLetterWizard

For detailed instructions on how to create a macro that runs each time you create a new document, turn to Chapter 40, "Building Custom Applications with VBA."


Customizing Letter Templates

The easiest way to make a template that will generate documents designed to work with the Letter Wizard is to start with one of Word's three built-in letter templates—Contemporary Letter, Elegant Letter, or Professional Letter—and save the modified template under a new name.

→ For details on how to work with Word templates, see "Customizing Word Templates".

If you prefer to create a new template from scratch or modify one of your company's existing letter templates, follow these guidelines to ensure that the documents it creates are compatible with the Letter Wizard:

  • Use a {CreateDate} field for the date. The Date line box shown previously in Figure 16.14 automatically finds the field and changes its formatting, based on the sample you choose from the drop-down box.

→ For a detailed explanation of how date and time fields work, see "Showing Dates and Times".

  • If you're printing on letterhead paper, draw an empty text box around the area where a logo or other graphic appears. The Letter Wizard adds the text box and flows the letter text around it. This technique is much simpler than trying to jury-rig a setting in the Pre-printed Letterhead section on the Letter Format tab.

  • In spite of what you see in the three prebuilt letter templates, don't use any "click here and type your letter" or "click here and type your name" placeholders. Instead, use the Styles described in the upcoming Table 16.3.

The Letter Wizard retrieves text from the letter and displays it on the wizard tabs. It identifies the text it needs based on the paragraph styles in the letter itself. For example, if you enter the text Ed Bott and format it with the Signature style, and then run the Letter Wizard, it places that text in the Sender's Name box on the Sender Info tab, as shown in Figure 16.16.

Figure 16.16. The Letter Wizard picks up the Sender's Name for the Sender Info tab by looking in the letter for a paragraph formatted with the Signature style.


Conversely, if you type the name Woody Leonhard in the Sender's Name box on the Letter Wizard's Sender Info tab, and then click OK, the Letter Wizard removes any lines in the letter that happen to be formatted in the Signature style, and replaces them with one containing the text Woody Leonhard.

In short, the Letter Wizard picks up data from the letter based on certain predefined styles, and it puts data back into the letter using those styles. The styles are listed in Table 16.3.

Table 16.3. Styles Recognized by the Letter Wizard
Style in Letter Tab in Wizard Box in Wizard
Inside Address Name Recipient Info Recipient's Name
Inside Address Recipient Info Delivery Address
Salutation Recipient Info Salutation
Reference Line Other Elements Reference Line
Mailing Instructions Other Elements Mailing Instructions
Attention Line Other Elements Attention
Subject Line Other Elements Subject
Cc List Other Elements Cc:
Signature Sender Info Sender's Name
Return Address Sender Info Return Address
Closing Sender Info Complimentary Closing
Signature Job Title Sender Info Job Title
Signature Company Sender Info Company
Reference Initials Sender Info Writer/Typist Initials
Enclosure Sender Info Enclosures

In addition, the main part of the letter should appear in a style called Body Text. The Letter Wizard modifies the Body Text, Closing, Signature, Signature Job Title, and Signature Company styles on-the-fly, depending on the option you select in the Choose a Letter Style box (Full block, Modified block, Semi-block) on the Letter Format tab.

If you construct your own templates using these styles, you should be able to use the Letter Wizard with excellent results.

Addressing Letters with the Outlook Contacts List

If you try to use the Outlook Address Book from inside the Letter Wizard, you'll quickly discover that Outlook insists on inserting a country line into every address that doesn't explicitly include a country. Thus, if you live in the United States, every address you insert follows this format:

Bill Gates

One Microsoft Way

Redmond, WA 98052

United States of America

When you use the Letter Wizard with Outlook's Address Book, no easy way exists to get around this problem. If you don't want the country line in the address, you have to delete it manually.

You can customize Word so that it imports names and addresses directly from your Outlook Address Book into any document, without requiring the Letter Wizard. Unfortunately, this feature, too, brings along the unnecessary country line. To add an Insert Address button to a toolbar, choose Tools, Customize, and click the Commands tab. From the Categories list on the left, choose Insert. Scroll through the list on the right until you find the Address Book command, and then click and drag it onto a convenient toolbar.

When you click the Insert Address button, Word opens your Address Book and waits for you to select a name. After you click OK, it inserts the contact's name and address into your document.

There's a trick you can use to get rid of the stray "United States of America" line that appears at the end of addresses you import by using the Insert Address button. If you use this trick, however, country names won't appear even when you want them to: If you select the name of a contact who lives in Thailand, for example, Word inserts their address properly, but the country won't appear at the end of the address.

To customize the format of names and addresses imported with the Insert Address icon:

  1. Start with a new blank document. Carefully type these three lines in the document:

    <PR_DISPLAY_NAME>
    <PR_STREET_ADDRESS>
    <PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>
    
  2. Select all three lines. Choose Insert, AutoText, New, and create a new AutoText entry with the name AddressLayout (all one word).

  3. The next time Word inserts an address using the Insert Address icon, it will look for an AutoText entry called AddressLayout. If it finds such an entry, it uses the codes in the entry as a template for the imported name and address.

If you use the three-line AutoText entry codes in step 1 in the previous list, you'll start getting names and addresses that look like this:

Bill Gates

One Microsoft Ave

Redmond, WA 98052

Word and Outlook recognize all the formatting codes defined in Table 16.4.

Table 16.4. Valid Formatting Codes for the AddressLayout AutoText Entry
Code Corresponding Field from Contact Form
PR_DISPLAY_NAME Full Name
PR_GIVEN_NAME First name
PR_SURNAME Last name
PR_STREET_ADDRESS Street address (one or more lines, from the designated mailing address)
PR_LOCALITY City
PR_STATE_OR_PROVINCE State or province
PR_POSTAL_CODE ZIP or postal code
PR_COUNTRY Country
PR_TITLE Job title
PR_COMPANY_NAME Company name
PR_DEPARTMENT_NAME Department name (Details tab)
PR_OFFICE_TELEPHONE_NUMBER Business number
PR_BUSINESS_FAX_NUMBER Business fax number
PR_OFFICE2_TELEPHONE_NUMBER Business 2 number
PR_HOME_TELEPHONE_NUMBER Home number
PR_CELLULAR_TELEPHONE_NUMBER Mobile number
PR_BEEPER_TELEPHONE_NUMBER Pager number
PR_EMAIL_ADDRESS First listed e-mail address
PR_COMMENT Text in the Notes box

You can write a macro to insert an address from Outlook into a Word document. The macro uses the formatting codes listed in Table 16.4 to determine how it should format the name and address it retrieves from Outlook.

For example, the macro in Listing 16.1 tells Word that you want to retrieve the name, company name, address, city/state/postal code, and country. It then lets you pick the name and address you want from the Outlook Address Book. Finally, the macro removes "United States of America," if it exists, and closes up any blank lines (if, for example, no company name is used), before depositing the name and address in your document.

Code Listing 16.1. InsertAddressFromOutlook()
Public Sub InsertAddressFromOutlook()
Dim strCode, strAddress As String
Dim iDoubleCR As Integer
`Set up the formatting codes in strCode
strCode = "<PR_DISPLAY_NAME>" & vbCr
strCode = strCode & "<PR_COMPANY_NAME>" & vbCr
strCode = strCode & "<PR_STREET_ADDRESS>" & vbCr
strCode = strCode & "<PR_LOCALITY>, <PR_STATE_OR_PROVINCE> <PR_POSTAL_CODE>" & ÂvbCr
strCode = strCode & "<PR_COUNTRY>" & vbCr
`Let the user choose the name in Outlook
strAddress = Application.GetAddress("", strCode, False, 1, , , True, True)
`Strip away the final "United States of America", if any
If Right(strAddress, 25) = "United States of America" & vbCr Then
strAddress = Left(strAddress, Len(strAddress) - 25)
End If
`Eliminate blank lines by looking for two carriage returns in a row
iDoubleCR = InStr(strAddress, vbCr & vbCr)
While iDoubleCR <> 0
strAddress = Left(strAddress, iDoubleCR - 1) & Mid(strAddress, iDoubleCR + 1)
iDoubleCR = InStr(strAddress, vbCr & vbCr)
Wend
`Insert the modified address at the current insertion point
Selection.TypeText strAddress
End Sub
						

Note

WOPR 2002 includes a utility called the Popup Contacts List that lets you right-click in a document and insert any name and address from your Outlook Contacts. See Appendix B, "What's on Que's WOPR XP/2002 Pack," for details.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.19.75.133