WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE and Outlook
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Using Ole to resolve a name in outlook

Keywords:   Outlook address book Address Lists

Question:

I need a WinBatch script, to check if Outlook has a certain person in my address book. Any ideas how to do that, via OLE?

Answer:

Try This.....

myName=askline("Mapi Resolve Name", "Please enter the name to search for", "Joe")
addrbook=askline("Mapi Resolve Name", "Please enter the address book to search", "Contacts")
Application=ObjectOpen("Outlook.Application")
myNameSpace = Application.GetNameSpace("MAPI")
myAddressList = myNameSpace.AddressLists(addrbook)
myEntries = myAddressList.AddressEntries(myName)

myresult=myEntries.Name
myresultaddr=myEntries.Address

Message("Resolving - %myName% to closest match in address book: %addrbook%", strcat(myresult,@CRLF,myresultaddr))

exit



Article ID:   W14481
Filename:   Using OLE to resolve name in Outlook.txt
File Created: 2000:06:08:14:19:02
Last Updated: 2000:06:08:14:19:02