Compartilhar via


_Account.GetAddressEntryFromID Method

Returns an AddressEntry object that represents the address entry specified by the given entry ID.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
<DispIdAttribute()> _
Function GetAddressEntryFromID ( _
    ID As String _
) As AddressEntry
'Usage
Dim instance As _Account
Dim ID As String
Dim returnValue As AddressEntry

returnValue = instance.GetAddressEntryFromID(ID)
[DispIdAttribute()]
AddressEntry GetAddressEntryFromID(
    string ID
)

Parameters

  • ID
    Type: System.String

    Used to identify an address entry that is maintained for the session.

Return Value

Type: Microsoft.Office.Interop.Outlook.AddressEntry
Returns an AddressEntry that has the ID property that matches the specified ID.

Remarks

This method is similar to the GetAddressEntryFromID(String) method of the NameSpace object, but has some additional contextual information about which account to use for the look-up. If there are multiple Microsoft Exchange accounts in the current profile, use the GetAddressEntryFromID method for the corresponding account.

The ID property for an AddressEntry is a permanent, unique string identifier that the transport provider assigns when an AddressEntry is created. Outlook maintains a hierarchy of address books for a session, and the address entry that is returned must match the given ID and be in one of the address books.

GetAddressEntryFromID returns an error if no item with the given ID can be found, if no connection is available, or if the user is set to work offline.

See Also

Reference

_Account Interface

_Account Members

Microsoft.Office.Interop.Outlook Namespace