L
Leyland
Hi,
Are there any developers out there which know how to
programatically create contacts in Outlook from Access.
I can create new contacts in the Contacts Default folder,
however I don't know how to move them into sub folders or
create them in different folders.
i.e This code creates a contact but how do I then move
the contact to a different folder
'Create a Microsoft Outlook object.
Set objOutlook = CreateObject("Outlook.Application")
Set olns = objOutlook.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)
'Create and open a new contact form for input.
Set objItem = objOutlook.CreateItem(olContactItem)
With objItem
.MessageClass = "IPM.Contacts
.FullName = "Leyland"
.Phone = "9999 9999"
.Save
'.Close
End With
'Quit Microsoft Outlook.
Set objOutlook = Nothing
Some help would be much appreciated.
Leyland
Are there any developers out there which know how to
programatically create contacts in Outlook from Access.
I can create new contacts in the Contacts Default folder,
however I don't know how to move them into sub folders or
create them in different folders.
i.e This code creates a contact but how do I then move
the contact to a different folder
'Create a Microsoft Outlook object.
Set objOutlook = CreateObject("Outlook.Application")
Set olns = objOutlook.GetNamespace("MAPI")
Set cf = olns.GetDefaultFolder(olFolderContacts)
'Create and open a new contact form for input.
Set objItem = objOutlook.CreateItem(olContactItem)
With objItem
.MessageClass = "IPM.Contacts
.FullName = "Leyland"
.Phone = "9999 9999"
.Save
'.Close
End With
'Quit Microsoft Outlook.
Set objOutlook = Nothing
Some help would be much appreciated.
Leyland