If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Automate copy Outlook email to a .msg file on a local drive - No .
I know that you can drag-drop Outlook messages from the Outlook folder to a
harddrive and vice versa, but I need to programmatically handle this. I have an application that scans the inbox for certain messages and performs tasks, such as extracting attachments, on those messages. I then needs to copy/move the message to a folder on the hard drive as a .msg file. I do not want to use a .pst file as the individual messages will need to be listed in the drive folder. I am useing CDO to process the messages and move them to another folder but I can't seem to get the copy to the hard drive part figured out. Can anyone help with this? Thanks. |
Ads |
#2
|
|||
|
|||
Automate copy Outlook email to a .msg file on a local drive - No .
item.SaveAs will save the item to the file path and name you specify. You
can save it as a MSG file or other format. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Cammy" wrote in message ... I know that you can drag-drop Outlook messages from the Outlook folder to a harddrive and vice versa, but I need to programmatically handle this. I have an application that scans the inbox for certain messages and performs tasks, such as extracting attachments, on those messages. I then needs to copy/move the message to a folder on the hard drive as a .msg file. I do not want to use a .pst file as the individual messages will need to be listed in the drive folder. I am useing CDO to process the messages and move them to another folder but I can't seem to get the copy to the hard drive part figured out. Can anyone help with this? Thanks. |
#3
|
|||
|
|||
Automate copy Outlook email to a .msg file on a local drive -
We use Exchange Server so I am using MAPI for the mail objects. This dies
not seem to work with MAPI. What am I doing wrong? I get the message object as follows: Set oMsgs = oFolder.Messages Set oMsg = oMsgs.GetFirst After I do some processing I need to save it to the drive as a .MSG file. Thanks "Ken Slovak - [MVP - Outlook]" wrote: item.SaveAs will save the item to the file path and name you specify. You can save it as a MSG file or other format. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Cammy" wrote in message ... I know that you can drag-drop Outlook messages from the Outlook folder to a harddrive and vice versa, but I need to programmatically handle this. I have an application that scans the inbox for certain messages and performs tasks, such as extracting attachments, on those messages. I then needs to copy/move the message to a folder on the hard drive as a .msg file. I do not want to use a .pst file as the individual messages will need to be listed in the drive folder. I am useing CDO to process the messages and move them to another folder but I can't seem to get the copy to the hard drive part figured out. Can anyone help with this? Thanks. |
#4
|
|||
|
|||
Automate copy Outlook email to a .msg file on a local drive -
That looks like CDO 1.21 code. The problem is CDO doesn't have a SaveAs
method, only Update (the equivalent of Save). Do you have Outlook installed on that computer? If so then use the Outlook object model to get the item instance and use SaveAs. Of course if Outlook isn't installed and you're using server side CDO then there are considerations. That's not compatible when Outlook is installed and client side CDO is subject to the object model guard unless you use the admin form in the appropriate public folder. One alternative you might want to look at is Redemption (www.dimastr.com/redemption). That's a COM wrapper for Extended MAPI functions and can replace all your CDO code. It bypasses the Outlook security and is OK with no Outlook as a server side library. I've used it that way to talk directly to EX mailboxes for server side code. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "Cammy" wrote in message ... We use Exchange Server so I am using MAPI for the mail objects. This dies not seem to work with MAPI. What am I doing wrong? I get the message object as follows: Set oMsgs = oFolder.Messages Set oMsg = oMsgs.GetFirst After I do some processing I need to save it to the drive as a .MSG file. Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
VBA to Copy email from read only folder to a local folder | Clifford | Outlook and VBA | 1 | October 22nd 07 07:18 PM |
Deleted local ost file to reset things.. now one user when sending email, gets email stuck in the Outbox (outlook 2003)... | markm75 | Outlook - General Queries | 0 | October 12th 07 01:15 AM |
Dealing with pst files on local hard drive | [email protected] | Outlook - General Queries | 5 | February 20th 07 01:30 PM |
Copy email from local folder to public folder | Andrew | Outlook and VBA | 0 | November 16th 06 09:29 AM |
Save emails by sender to local drive folder | Albert | Outlook - General Queries | 1 | January 12th 06 03:42 PM |