I use IMAPIProp::CopyTo in an add-in for Outlook 2010 to save the currently displayed IMessage into a new IMessage in a .msg file on disk. Everything works fine for messages that reside in the user's mailbox.
When I try this with messages that are opened from a .msg file on disk and contain attachments, IMAPIProp::CopyTo returns 0x80070005 (MAPI_E_NO_ACCESS). The details returned from IMAPIProp::GetLastError are:
ulVersion: 0
lpszError: "A resource is busy or you lack sufficient access rights or permissions"
lpszComponent: ""
ulLowLevelError: 71
ulContext: 0
After using File->Save As or File->Save, my call to IMAPIProp::CopyTo succeeds, too. IMAPIProp::CopyTo also succeeds if I exclude PR_MESSAGE_ATTACHMENTS.
What might Outlook be doing to prepare for a successful call to IMAPIProp::CopyTo?