I want to save each email items into files

K

Kenny

Here is my pseudo-like code.

--------------------------------------------
if olItem.BodyFormat = olHtml then
olItem.SaveAs olItem.entryID, olHtml
elseif olItem.BodyFormat = olPlainText then
olItem.SaveAs olItem.entryID, olPainText
elseif olItem.BodyFormat = olMSG then
olItem.SaveAs olItem.entryID, olMSG
....
...

---------------------------------------------

I first checked email's Bodyformat property and
SaveAs into appropriate file type.
However, Bodyformat sometime returns wrong type so that
I can't save that email.

Is there any other way to see correct email type so that
I save them all successfully.

Thank you.
 
S

Sue Mosher [MVP-Outlook]

Try using Inspector.EditorType instead of BodyFormat. YOu will probably also
want to append the appropriate file extension (htm, txt, msg) to the file
name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top