Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: OLE Outlook Contact
In Outlook, as a VBA script it is posible to run the following script but this is not very easy to run from other applications outside Outlook and "Number To Find" needs to be a variable which seems difficult to acheive in VBA.
Sub FindContact() Set myOlApp = CreateObject("Outlook.Application") Set myNameSpace = myOlApp.GetNamespace("MAPI") Set myContacts = myNameSpace.GetDefaultFolder(olFolderContacts) Set myItem = myContacts.Items.Find("[BusinessTelephoneNumber] = ""Number to find Here"" ") myItem.Display End Sub
Can anyone think of an easier more portable way of getting an Outlook 97/2000 contact record displayed by using a telephone number as a reference to find the required contact?
olFolderContacts = 10 ;constant referencing the 'Contacts' folder myOlApp = ObjectOpen("Outlook.Application") myNameSpace = myOlApp.GetNamespace("MAPI") myContacts = myNameSpace.GetDefaultFolder(olFolderContacts) myItem = myContacts.Items myFind = myItem.Find('[BusinessTelephoneNumber] = "(206) 937-9335" ') myFind.Display
Article ID: W14918
File Created: 2001:11:08:12:40:58
Last Updated: 2001:11:08:12:40:58