Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Copying/Moving/Saving an Embedded/Attached Message to a Mail Folder (http://www.outlookbanter.com/outlook-vba/55186-copying-moving-saving-embedded-attached.html)

B August 21st 07 07:11 PM

Copying/Moving/Saving an Embedded/Attached Message to a Mail Folder
 
Hello,

I receive mail where a message is embedded/attached*. Normally, I'd
open the (parent) message (in a folder other than Inbox) and drag the
attachment to a folder (also other than Inbox), then mark it as
Unread.

I'm trying to do this programmatically within Outlook 2003/VBA, but
seem to be at a loss.

The closest I can come is to save the attachment to a temporary file
and then try to import, but then all sorts of info is lost (timestamp,
etc.).

I also tried using CDO, but I seem to have trouble finding my way
around it...

Any ideas?

Thanks.



* ... because mail.com is being nasty after me having a hockeymail.com
account for 10+ years. They won't even let me PAY them for POP3
access, and Web2POP isn't working now ether, more ranting in private...


Eric Legault [MVP - Outlook] August 21st 07 07:46 PM

Copying/Moving/Saving an Embedded/Attached Message to a Mail Folde
 
AFAIK, there's no way to directly take an embedded message (as an Attachment
object) and move it out of the message. You do have to save it as a .msg
file, but you'd also need to use Redemption (http://www.dimastr.com) to
import it - see the RDOSession.GetMessageFromMsgFile method.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"B" wrote:

Hello,

I receive mail where a message is embedded/attached*. Normally, I'd
open the (parent) message (in a folder other than Inbox) and drag the
attachment to a folder (also other than Inbox), then mark it as
Unread.

I'm trying to do this programmatically within Outlook 2003/VBA, but
seem to be at a loss.

The closest I can come is to save the attachment to a temporary file
and then try to import, but then all sorts of info is lost (timestamp,
etc.).

I also tried using CDO, but I seem to have trouble finding my way
around it...

Any ideas?

Thanks.



* ... because mail.com is being nasty after me having a hockeymail.com
account for 10+ years. They won't even let me PAY them for POP3
access, and Web2POP isn't working now ether, more ranting in private...




All times are GMT +1. The time now is 09:51 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com