PC Review


Reply
Thread Tools Rate Thread

Capturing the Message Body on Send of the email.

 
 
TrussworksLeo
Guest
Posts: n/a
 
      15th Aug 2008
Hello,

I was wondering if someone could send me in the right direction.

I have a VB.Net app that opens an email add the sender and adds attachments
to it.

I would like to be able to either save the message or save the txt in the
body of the message to a file on the file system with other files related to
the purpose of the email. (I know how to do the file system operations once I
get access to the message body)

My App instantiated the message so I should have access to the on send event
correct?

Where do I begin?

I have Sue Moshers book on Outlook 2007 Programming but nothing quite fits.

--
Thank You, Leo
 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      15th Aug 2008
Is this message created using the Outlook object model? If you have the
message as a MailItem object then save it and read the Body or HTMLBody
properties.

If you want to wait until send occurs you can either declare the MailItem
WithEvents and handle item.Send() or declare the Outlook.Application object
WithEvents and handle application.ItemSend(). You still should save it
before you read Body or HTMLBody.

--
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


"TrussworksLeo" <(E-Mail Removed)> wrote in message
news:9F68028D-5CDA-4B6C-8D18-(E-Mail Removed)...
> Hello,
>
> I was wondering if someone could send me in the right direction.
>
> I have a VB.Net app that opens an email add the sender and adds
> attachments
> to it.
>
> I would like to be able to either save the message or save the txt in the
> body of the message to a file on the file system with other files related
> to
> the purpose of the email. (I know how to do the file system operations
> once I
> get access to the message body)
>
> My App instantiated the message so I should have access to the on send
> event
> correct?
>
> Where do I begin?
>
> I have Sue Moshers book on Outlook 2007 Programming but nothing quite
> fits.
>
> --
> Thank You, Leo


 
Reply With Quote
 
viktor dolezel
Guest
Posts: n/a
 
      17th Sep 2008
I'm having a similar issue.
How can I instantiate a MailItem if I only have the .msg file?
Thanks in advance.

"Ken Slovak - [MVP - Outlook]" wrote:

> Is this message created using the Outlook object model? If you have the
> message as a MailItem object then save it and read the Body or HTMLBody
> properties.
>
> If you want to wait until send occurs you can either declare the MailItem
> WithEvents and handle item.Send() or declare the Outlook.Application object
> WithEvents and handle application.ItemSend(). You still should save it
> before you read Body or HTMLBody.
>
> --
> 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
>
>
> "TrussworksLeo" <(E-Mail Removed)> wrote in message
> news:9F68028D-5CDA-4B6C-8D18-(E-Mail Removed)...
> > Hello,
> >
> > I was wondering if someone could send me in the right direction.
> >
> > I have a VB.Net app that opens an email add the sender and adds
> > attachments
> > to it.
> >
> > I would like to be able to either save the message or save the txt in the
> > body of the message to a file on the file system with other files related
> > to
> > the purpose of the email. (I know how to do the file system operations
> > once I
> > get access to the message body)
> >
> > My App instantiated the message so I should have access to the on send
> > event
> > correct?
> >
> > Where do I begin?
> >
> > I have Sue Moshers book on Outlook 2007 Programming but nothing quite
> > fits.
> >
> > --
> > Thank You, Leo

>
>

 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      17th Sep 2008
The only way I know how to do that is to use the 3rd party Redemption
library (www.dimastr.com/redemption), which can import a MSG file as an
item, then you can save it and open it in the Outlook object model as an
Outlook object, or continue to deal with it as an RDO object.

--
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


"viktor dolezel" <viktor (E-Mail Removed)> wrote in message
news:70E33E8B-24E6-4D19-A914-(E-Mail Removed)...
> I'm having a similar issue.
> How can I instantiate a MailItem if I only have the .msg file?
> Thanks in advance.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
send email using lotus notes - Tbl data in message body Boss Microsoft Access VBA Modules 3 22nd Oct 2009 09:48 AM
send an email with an html file in the message body Duarte Microsoft Outlook Discussion 0 12th Dec 2008 01:18 PM
Send document as email body message Danni Microsoft Powerpoint 1 7th Aug 2008 01:20 PM
Send output of Report as body of email message =?Utf-8?B?TWFydHluIEdyaWdncw==?= Microsoft Access Reports 0 28th Feb 2006 02:05 PM
Everytime I send email messages the body of my email message is b. =?Utf-8?B?SG9vZGlpaQ==?= Microsoft Outlook Discussion 1 1st Mar 2005 03:39 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:08 PM.