Share via


Details Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The Details method displays a modal dialog box that provides detailed information about an AddressEntry object. You must use error handling to handle run time errors when the user clicks Cancel in the dialog box. The Details method actually stops the code from running while the dialog box is displayed.

Note The Details method fails if the Name property is empty.

expression**.Details(HWnd)**

expression   Required AddressEntry object.

*HWnd  * Optional Variant. The parent window handle for the details dialog box. A zero value (the default) specifies a modal dialog box.

Example

This Visual Basic for Applications example uses the Add method to add a new AddressEntry to the Personal Address Book. The Name, "John Q. Public" is necessary to avoid errors.

If this entry already exists, the code skips to DialogBox:. The Details method displays a dialog box that shows the information for this entry.

  Set myOlApp = CreateObject("Outlook.Application")
    Set myNamespace = myOlApp.GetNamespace("MAPI")
    Set myAddrList = myNamespace.AddressLists("Personal Address Book")
    Set myAddrEntries = myAddrList.AddressEntries
    Set myEntry = myAddrEntries.Add("Microsoft Mail Address")
    myEntry.Name = "John Q. Public"
    On Error GoTo DialogBox
    myEntry.Address = "someone@microsoft.com"
    myEntry.Update
DialogBox:
    myEntry.Details