VBScript delete Outlook Contacts help

98 views
Skip to first unread message

Tash

unread,
Apr 18, 2011, 2:34:37 PM4/18/11
to VBScript
My task is to update some departmenttal contacts from an external SQL
database. Now I was thinking of creating a button in Outlook that
would import dept contacts from the sql database. But to get things
rolling I hardcoded a contact and tried to add. This part works.
---------------------
Const olContactItem = 2

Set objOutlook = CreateObject("Outlook.Application")
Set objContact = objOutlook.CreateItem(olContactItem)

objContact.FullName = "Ken Myer"
objContact.Email1Address = "ken...@fabrikam.com"
objContact.CompanyName = "Fabrikam"
objContact.JobTitle = "Network Administrator"
objContact.HomeTelephoneNumber = "555-555-8888"
objContact.HomeAddress = "3725 205th NE" & vbCrLf & "Redmond, WA
98052"
objContact.Birthday = "9/15/1966"
objContact.User1 = "T&EContactManagement"

objContact.Save
-----------------------------------


What I would like to do is delete all contacts that have user1
property = "T&EContactManagement" before I update. I cant figure out
how to delete with a certain property. Can anyone give me any ideas?
Reply all
Reply to author
Forward
0 new messages