Microsoft KB Archive/222219

From BetaArchive Wiki

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:

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

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.

    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
                        
  5. On the Form menu, click Run This Form.
  6. Type a resolvable name in the To field. Click the Message field and wait for the name to be resolved.
  7. 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:

146636 OL2000: Questions About Custom Forms and Outlook Solutions



Additional query words: OutSol OutSol2000 OL2K

Keywords: kbbug kbnofix kbprogramming KB222219