G Guest May 27, 2005 #1 What would the sub function be to get the code to fire when a contact is double clicked to open?
G Guest Jun 1, 2005 #3 Thanks for the reply Sue...I'm not for sure how to do that. What I'm looking for it when I double click a contact from the "Contacts" screen a message box will appear. Private ????????() msgbox "Hello' End Sub Thanks, Kacy
Thanks for the reply Sue...I'm not for sure how to do that. What I'm looking for it when I double click a contact from the "Contacts" screen a message box will appear. Private ????????() msgbox "Hello' End Sub Thanks, Kacy
S Sue Mosher [MVP-Outlook] Jun 1, 2005 #4 Try this code in the ThisOutlookSession module: Dim WithEvents colInsp As Outlook.Inspectors Private Sub Application_Startup() Set colInsp = Application.Inspectors End Sub Private Sub colInsp_NewInspector(ByVal Inspector As Inspector) If Inspector.CurrentItem.Class = olContact Then MsgBox "Hello World!" End If End Sub If you're new to Outlook VBA macros, these web pages should help you get started: http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1 http://www.outlookcode.com/d/vb.htm -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers
Try this code in the ThisOutlookSession module: Dim WithEvents colInsp As Outlook.Inspectors Private Sub Application_Startup() Set colInsp = Application.Inspectors End Sub Private Sub colInsp_NewInspector(ByVal Inspector As Inspector) If Inspector.CurrentItem.Class = olContact Then MsgBox "Hello World!" End If End Sub If you're new to Outlook VBA macros, these web pages should help you get started: http://www.winnetmag.com/Articles/Index.cfm?ArticleID=21522&pg=1 http://www.outlookcode.com/d/vb.htm -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers