Programmatically creating Contacts in a Public Folder

  • Thread starter Thread starter Mirkwood
  • Start date Start date
M

Mirkwood

I am looking to create a list of Contacts in a Public Folder by
programmatically pulling them from an Access database. I can create the new
Public Folder, and I can pull Contacts from Access into the default Contacts
folder in a mailbox... but so far have had no luck creating the contacts in
the new public folder.

Anyone with any ideas?
 
Use the Add method on the target folder's Items collection. If it's a
message form, you can use the Drafts folder as the target. If the target is
a default folder, you can use the Namespace.GetDefaultFolder method to
return it as a MAPIFolder object. Otherwise, you can use the code at
http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy
and return the MAPIFolder corresponding to a given path string.
 
Back
Top