Convert a MailItem to a ContactItem

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
C

Craig Buchanan

I am trying to convert a MailItem to a ContactItem programatically. I do
this by copying the MailItem, then moving the copy to the Contacts folder.
While lthe Move() method creates a new Contact in the Contacts folder, it
also leaves the copy of the message in the Inbox.

Here's the code:

'copy the mailItem
Dim copyOfMailItem As Outlook.MailItem = mailItem.Copy

'move the mailItem to the Contacts folder, which creates a contact
'it also calls Save() on itself implicitly
copyOfMailItem.Move([Contacts folder])

'destroy copy and release reference
copyOfMailItem = Nothing

What am I missing? Thoughts are appreciated. Thanks.
 
I am trying to convert a MailItem to a ContactItem programatically. I do
this by copying the MailItem, then moving the copy to the Contacts folder.
While lthe Move() method creates a new Contact in the Contacts folder, it
also leaves the copy of the message in the Inbox.

Here's the code:

Ask in the coding newsgroup microsoft.public.outlook.program_vba
 
Back
Top