• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 346
  • Last Modified:

Programmatically bring up Address List Dialog

I would like to bring up the address list dialog programmatically.  When a user selects someone from the address list,  I would like the information returned to a variable or array.

Can this be done?

In Excel, I can bring up Excel dialogs using:  Application.Dialog(xlDialogZoom), etc.

There doesn't seem to be anything like this in Outlook.

1 Solution
Jeffrey CoachmanCommented:

Assumming that you could call up the dialog box... you would probably need to access the API to pull the value from the dialog box.

I do not believe that the values contained it the dialog box are "Exposed" to VBA.

For example, the code:
Will, in fact, display the dialog box. But capturing current zoom percent "From the dialog box" is not possible.

You could however "get" the zoom ration through VBA:
    MsgBox ActiveWindow.Zoom
...But not from the dialog box.

You could also set the Zoom ratio in code:
ActiveWindow.Zoom = 200

Again, to accesss the value from the dialog box you would probably have to access the API. You whould have to Access the "AfterUpdate?" event of the dialog box, and caputre the data there.

Or, like in the Excel example, you could get the value through code after the value is being used (When it is present in the message "To..." Box).
Something like this for Excel:

Your Outlook code would look something like this:

My above example is "Air code" so it will not work, but you get the idea.

Check these to books:

Good luck!

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now