Microsoft KB Archive/222219

= OL2000: BeforeCheckNames Event Does Not Fire =

Article ID: 222219

Article Last Modified on 11/23/2006

-

APPLIES TO


 * Microsoft Outlook 2000 Standard Edition

-



This article was previously published under Q222219



SYMPTOMS
You use the BeforeCheckNames event in Visual Basic Scripting Edition (VBScript), but the event does not fire when an e-mail name is resolved on the form.



CAUSE
The event does not fire under the following circumstances:
 * You customized a Journal Entry form and then resolved a contact in the Contacts field.
 * You customized a Contact form and then resolved a contact in the Contacts field.
 * You customized any type of form and Outlook automatically resolved the name in the background.
 * You programmatically created and resolved a recipient.



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



MORE INFORMATION
The BeforeCheckNames event will fire when you explicitly force Outlook to resolve an e-mail name, either by using the Check Names command, or by pressing CTRL+K.

Steps to Reproduce Problem
Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

https://partner.microsoft.com/global/30000104

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS

The following steps illustrate two of the limitations above.  Open a new mail message. On the Tools menu, click Forms and then click Design This Form. Click the (P.2) page of the form. On the Form menu, click Control Toolbox. Drag a CommandButton control onto the form and then close the Control Toolbox.  On the Form menu, click View Code, add the following code in the Script Editor, and then close the Script Editor. Be sure to specify a valid recipient in the CommandButton1_Click event. Sub Item_BeforeCheckNames MsgBox "BeforeCheckNames event has fired." End Sub

Sub CommandButton1_Click ' Change "username" to a resolvable e-mail address. Set MyRecip = Item.Recipients.Add("username") MyRecip.Resolve End Sub  On the Form menu, click Run This Form. Type a resolvable name in the To field. Click the Message field and wait for the name to be resolved.</li> Click the P.2 page of the form and then click CommandButton1.</li></ol>

The message box doesn't appear after Outlook resolves either recipient's name.

<div class="references_section">