OL98: Recipient.Address Does Not Return Address (282409)



The information in this article applies to:

  • Microsoft Outlook 98

This article was previously published under Q282409

SYMPTOMS

You use the Address property of a Recipient object in the Outlook object model, but no address is returned.

CAUSE

When you added a recipient to a mail message form, you used the Address Book window to add the recipient, instead of manually typing the address.

WORKAROUND

Use one of the following methods to work around the problem:

Method 1

Use the Address property of the AddressEntry object instead of the Address property of the Recipient object.

NOTE: the AddressEntry object was added in the Outlook 98 object model, so you cannot use this workaround if the solution needs to work with Outlook 97.

Method 2

Use the Colloboration Data Objects (CDO) 1.2x object model to obtain address information about the recipient. However, the CDO object model and Outlook object model do not directly interoperate with each other. Therefore, you must use the Outlook object model to save the mail message, then locate it with the CDO object model to access the properties of the recipients. For additional information about using CDO to work with recipient properties, click the article number below to view the article in the Microsoft Knowledge Base:

196507 HOWTO: Retrieve Alternate E-mail Addresses Using CDO

Method 3

Make sure that users manually type the recipients' names and do not use the Address Book window.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Problem

  1. Open a new mail message.
  2. Click the To button to display the Address Book window, and then add a recipient to the To field.
  3. Leave the mail message open.
  4. Run the following code from Microsoft Visual Basic, or Microsoft Visual Basic for Applications in another Microsoft Office program:
    Sub TestRecipient()
       Set ol = CreateObject("Outlook.Application")
       MsgBox ol.ActiveInspector.CurrentItem.Recipients(1).Address
    End Sub   
    					

REFERENCES

For additional information about creating solutions with Microsoft Outlook, click the article numbers below to view the articles in the Microsoft Knowledge Base:

180826 OL98: Resources for Custom Forms and Programming

182349 OL98: Questions About Custom Forms and Outlook Solutions


Modification Type:MinorLast Reviewed:2/26/2004
Keywords:kbbug kbpending KB282409