OL2000: BeforeCheckNames Event Does Not Fire

ID: Q222219


The information in this article applies to:
  • Microsoft Outlook 2000


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 this to be a problem in the Microsoft products 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 Solution Provider or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Solution Providers, please see the following page on the World Wide Web:

http://www.microsoft.com/mcsp/
For more information about the support options available from Microsoft, please see the following page on the World Wide Web:

http://www.microsoft.com/support/supportnet/overview/overview.asp
The following steps illustrate two of the limitations above.
  1. Open a new mail message.


  2. On the Tools menu, click Forms and then click Design This Form.


  3. 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.


  4. 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.


  5. 
    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 
  6. On the Form menu, click Run This Form.


  7. Type a resolvable name in the To field. Click the Message field and wait for the name to be resolved.


  8. Click the P.2 page of the form and then click CommandButton1.


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


REFERENCES

For additional information about available resources and answers to commonly asked questions about Microsoft Outlook 2000 solutions, please see the following article in the Microsoft Knowledge Base:

Q146636 OL2000: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol2000 OL2K

Keywords : kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: November 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.