How to display Check Names box in vbscript

L

Long Nguyen

Hi,

When we send an email in Outlook, if the email address we type (in non-smtp
format) is not in the Address book then Outlook would display a Check Names
box so that we can select a valid address.

How could I do similar thing in my custom form's vbscript.

Thanks
Long.
 
H

Hollis D. Paul

How could I do similar thing in my custom form's vbscript.
There should be a Resolve or ResolveAll method in the Outlook Object
Model. You should also be able to find some example code at
http://www.slipstick.com . Another source for example code is:
http://www.outlookexchange.com/Articles/home/outlookcodeexample.asp

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
L

Long Nguyen

Thank you Paul for the suggestion.

I am aware of the Resolve and ResolveAll method and I would use them to
resolve the addresses put in by the users. However if I detect that a
specified address is invalid I would like to display the Check Names dialog
so that the users could interactively select an address from the Address
books. Do you know if it is possible to do this?

Another question I'd like to ask is that with mail fields in forms a user
could just put in an address then press CNTK-K to do the name check. Is it
possible to have user-defined mail fields in a custom forms? (I mean a mail
filed defined by users, not the predefined To and CC fields).

Thanks
Long.

Hollis D. Paul said:
How could I do similar thing in my custom form's vbscript.
There should be a Resolve or ResolveAll method in the Outlook Object
Model. You should also be able to find some example code at
http://www.slipstick.com . Another source for example code is:
http://www.outlookexchange.com/Articles/home/outlookcodeexample.asp

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
H

Hollis D. Paul

Do you know if it is possible to do this?
It appears you can do this if you use a CDO session. Here is what I
found in the last 32K messages in this ng.
*****************
From: "Scott Restivo" <[email protected]>
Subject: Re: "checknames" function
Date: Thu, 28 Feb 2002 21:40:40 -0800
Newsgroups: microsoft.public.outlook.program_forms


Have to use CDO's Resolve method to pop up the ambiguous name
resolution
box.

Also, why would you be displaying the Item? Isn't it already displayed
in
order for you to click the CommandButton2? Just curious on that.

Scott Restivo
Crow Canyon Systems, Inc.
Outlook Help Desk 2.2
http://www.outlookhelpdesk.com

**************
From: "Scott Restivo" <[email protected]>
Subject: Re: "checknames" function
Date: Fri, 1 Mar 2002 19:49:26 -0800
Newsgroups: microsoft.public.outlook.program_forms


CDO = Collaboration Data Objects, very useful for coding Exchange and
Outlook.

You could have a text box bound to a field. When the field changes, it
kicks
off the Custom Property routine. Trap the change with that and then
take
what the user entered and add it to the Recipients collection of a
message
created using CDO. Use the Resolve method. That will pop a dialog box
if it
cannot be resolved. This is a quick and dirty overview of it, but
that's the
basic idea.

Also, using CDO, you can show the Address Book if you wanted users to
pick
a
name out of that.

If you are going to do this, you need some good books on CDO. Any of
the
Outlook programming books have a chapter on it, also there is
www.cdolive.com, also CDO.HLP on the Exchange server CD is useful. I
think
for what you are trying to do, CDO will be very helpful.

Scott Restivo
Outlook Help Desk 2.2
http://www.outlookhelpdesk.com
*****************


Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
L

Long Nguyen

Thanks Paul. I will have a lok at it. Your comments is appreciated.

Long.
Hollis D. Paul said:
Do you know if it is possible to do this?
It appears you can do this if you use a CDO session. Here is what I
found in the last 32K messages in this ng.
*****************
From: "Scott Restivo" <[email protected]>
Subject: Re: "checknames" function
Date: Thu, 28 Feb 2002 21:40:40 -0800
Newsgroups: microsoft.public.outlook.program_forms


Have to use CDO's Resolve method to pop up the ambiguous name
resolution
box.

Also, why would you be displaying the Item? Isn't it already displayed
in
order for you to click the CommandButton2? Just curious on that.

Scott Restivo
Crow Canyon Systems, Inc.
Outlook Help Desk 2.2
http://www.outlookhelpdesk.com

**************
From: "Scott Restivo" <[email protected]>
Subject: Re: "checknames" function
Date: Fri, 1 Mar 2002 19:49:26 -0800
Newsgroups: microsoft.public.outlook.program_forms


CDO = Collaboration Data Objects, very useful for coding Exchange and
Outlook.

You could have a text box bound to a field. When the field changes, it
kicks
off the Custom Property routine. Trap the change with that and then
take
what the user entered and add it to the Recipients collection of a
message
created using CDO. Use the Resolve method. That will pop a dialog box
if it
cannot be resolved. This is a quick and dirty overview of it, but
that's the
basic idea.

Also, using CDO, you can show the Address Book if you wanted users to
pick
a
name out of that.

If you are going to do this, you need some good books on CDO. Any of
the
Outlook programming books have a chapter on it, also there is
www.cdolive.com, also CDO.HLP on the Exchange server CD is useful. I
think
for what you are trying to do, CDO will be very helpful.

Scott Restivo
Outlook Help Desk 2.2
http://www.outlookhelpdesk.com
*****************


Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2195
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top