A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

MailItem SaveAs



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 19th 08, 11:42 PM posted to microsoft.public.outlook.program_addins
Koen Verwimp
external usenet poster
 
Posts: 26
Default MailItem SaveAs

Hello,

When I save a mail to MSG file programmatically with SaveAs on MailItem, I
can't read the PR_BODY property afterwards. I tried also with Outlook Spy to
read that propery, but the PR_BODY property is empty. Opening the MSG file in
outlook displays the body, but can't the property PR_BODY property.

After dragging it into my Inbox again, PR_BODY is filled again. The binary
format is also not the same if I save the mail as MSG programmatically versus
File-Save in Outlook. After saving the mail via File-Save in outlook ...
the PR_BODY is available.

What is happening here with SaveAs programmatically?

thanks,
Koen

Ads
  #2  
Old September 21st 08, 01:08 AM posted to microsoft.public.outlook.program_addins
Dave Vespa [MSFT]
external usenet poster
 
Posts: 9
Default MailItem SaveAs

I think you are seeing the results of Outlook's "Best Body" logic. Outlook
could store the body in three locations:

PR_BODY
PR_BODY_HTML
PR_RTF_COMPRESSED (which could contain RTF, HTML, or Plain text)

Outlook computes the "Best Body" on the fly. What could be happening here
is that the body is actually stored in another one of the other properties of
the message.

I would use MFCMAPI to view the MSG file and look at the addtional
properties to find which property it could be in.

http://www.codeplex.com/mfcmapi

Dave

"Koen Verwimp" wrote:

Hello,

When I save a mail to MSG file programmatically with SaveAs on MailItem, I
can't read the PR_BODY property afterwards. I tried also with Outlook Spy to
read that propery, but the PR_BODY property is empty. Opening the MSG file in
outlook displays the body, but can't the property PR_BODY property.

After dragging it into my Inbox again, PR_BODY is filled again. The binary
format is also not the same if I save the mail as MSG programmatically versus
File-Save in Outlook. After saving the mail via File-Save in outlook ...
the PR_BODY is available.

What is happening here with SaveAs programmatically?

thanks,
Koen

  #3  
Old September 22nd 08, 02:41 PM posted to microsoft.public.outlook.program_addins
Koen Verwimp
external usenet poster
 
Posts: 26
Default MailItem SaveAs

PR_RTF_COMPRESSED is filled!

Thanks,
Koen

"Dave Vespa [MSFT]" wrote:

I think you are seeing the results of Outlook's "Best Body" logic. Outlook
could store the body in three locations:

PR_BODY
PR_BODY_HTML
PR_RTF_COMPRESSED (which could contain RTF, HTML, or Plain text)

Outlook computes the "Best Body" on the fly. What could be happening here
is that the body is actually stored in another one of the other properties of
the message.

I would use MFCMAPI to view the MSG file and look at the addtional
properties to find which property it could be in.

http://www.codeplex.com/mfcmapi

Dave

"Koen Verwimp" wrote:

Hello,

When I save a mail to MSG file programmatically with SaveAs on MailItem, I
can't read the PR_BODY property afterwards. I tried also with Outlook Spy to
read that propery, but the PR_BODY property is empty. Opening the MSG file in
outlook displays the body, but can't the property PR_BODY property.

After dragging it into my Inbox again, PR_BODY is filled again. The binary
format is also not the same if I save the mail as MSG programmatically versus
File-Save in Outlook. After saving the mail via File-Save in outlook ...
the PR_BODY is available.

What is happening here with SaveAs programmatically?

thanks,
Koen

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MailItem.SaveAs encoding characters wrong from HTML message MattS Outlook and VBA 3 April 1st 08 03:26 PM
MailItem.SaveAs method Mrunali Outlook - Using Forms 0 April 17th 07 04:16 PM
_MailItem - SaveAs MON205 Outlook - General Queries 1 February 22nd 07 07:01 PM
_MailItem - SaveAs MON205 Add-ins for Outlook 1 February 22nd 07 07:01 PM
How can I create a MailItem that displays like a received MailItem ? Clive Outlook - Using Forms 0 February 27th 06 05:14 PM


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.