When you say MAPI do you mean CDO 1.21? If so you can't just assign an
Outlook item to a CDO item. You have to get the EntryID of the item and
possibly the StoreID of the MAPIFolder where the item lives and use CDO's
Session.GetMessage(strEntryID, strStoreID) method.
The CDO CopyTo method would use the Outlook MAPIFolder.EntryID and StoreID
properties.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Scupper" <scupperAThotmailDOTcom> wrote in message
news:Xns94A6907764222scupperhotmailcom@207.46.248.16...
> I am doing large searches through our Exchange store and copying the
> messages to a subfolder of my Inbox using VB.NET. The problem with this is
> that each time it copies a message, Exchange wants to virus scan it and
the
> server admin does not think he can disable that just for this process. So,
> I am trying instead to copy the messages to a PST file I have set up on my
> workstation.
>
> Unfortunately, I cannot seem to get MAPI to talk to the PST file. Only
> Outlook (2000)-based calls will go to it, but Outlook refuses to allow me
> to edit items I create, nor will it copy the messages if they are passed
to
> it in MAPI.Message form.
>
> I have tried:
>
> oItem = MAPI.Message (passed into the function)
>
>
> Dim oCopy As Outlook.MAPIMessage
> oCopy = oWorkingFolder.Items.Add()
>
> oCopy.Sender = oItem.Sender (gives me a message that
> Outlook.MAPIMessage.Sender is read-only)
>
>
> I have also tried:
>
> oItem.CopyTo(sFolderID,sStoreID)
>
> Passing what outlook returns as the folder and store ID, but MAPI then
> cannot find the folder.
>
>
>
> Any help would be much appreciated.