Skip navigation

Printing the Manager's Name Field for a Contact

Downloads
46936.zip

I want to print an entry from my Contacts folder, but the Manager's Name field doesn't print even though it's in the current view. How can I print this information?

Of all the personal information you can enter on an Outlook contact's General and Details tabs, I've always wondered why Manager's Name is the only field that doesn't print. This problem goes back to at least Outlook 2000. There are two ways to work around it: with a customized view or by using some Outlook Visual Basic for Applications (VBA) code.

For the customized view method, create a new address card view or modify an

existing address card view, such as Address Cards or Detailed Address Cards, to add the Manager's Name field to the view. Here's an easy way to modify a card view: Right-click the separator between columns or any other blank space. The resulting pop-up menu includes the Show Fields command for adding and removing fields from the view. You'll find Manager's Name listed under Name Fields and All Contact Fields. When you see the manager's name in the view along with the other fields you want to print, select the contact you want to print, then choose File, Print. On the Print dialog box, under Print style, choose Card Style. Under Print range, choose Only selected items, then click OK. The contact you've selected will print in the card style, and the printout will include all the fields shown in the view.

The main drawback of the view method is that it requires you to customize a view and to print from the Contacts folder. It doesn't help if you've opened a contact in its own window and want to print it.

The VBA method works whether you're looking at a Contacts folder or have the contact open in a window. The VBA approach takes advantage of the fact that Outlook always includes in the printout any custom property added to the item that contains data. Web Listing 1 (http://www.windowsitpro.com/microsoftexchangeoutlook, InstantDoc ID 46936) shows the code for a macro that adds a custom property to hold the manager's name, copies the name to that property, then prints the item.

Notice that the code checks the item's MessageClass and adds the property only when the class is IPM.Contact. In other words, the code adds the property only when the item is using the default contact form. Adding a new field to an item that's based on a custom form causes the form to "one-off" or become embedded in the item and disconnected from the published form definition. So not only is the item larger, but the code behind the form doesn't run and, in Microsoft Office Outlook 2003 and Outlook 2002 Service Pack 3 (SP3), ActiveX controls other than those included with Outlook don't initialize. If you're using a custom form, add the custom Manager's Name field to the custom form itself and add to the form the VBScript code in Listing 1, so that the Manager's Name custom field is always up-to-date with the manager information entered on the form's Details tab.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish