Type mismatch error when getFirstitem

0 pts.
Tags:
LotusScript
I have a script to read the content and attachment of the mail. Dim RTITEM As NOTESrICHtEXTiTEM ... Set doc=coll.GetNthDocument(a) Set rtitem = doc.GetFirstItem("Body") mailfrom = doc.GetItemValue("From")(0) .. It is fine for most of the mails. But when I use it to read the following mail, it shows a error "type mismatch" Mail content: [MIME content for this item is stored in attachment $RFC822.eml. Parsing MIME content failed: Incorrect format in MIME data..] And there is a attachment $RFC822.eml I tested it and this error returned from the statement doc.GetFirstItem("Body") Is it something wrong with the code ?
ASKED: October 12, 2007  6:33 AM
UPDATED: February 29, 2008  2:40 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

It looks like maybe the Body item in that document is text — not rich text. Dim rtitem as Variant so that you can assign it with any type of item.

Then of course you have to check what the type is before you do anything with it, e.g.

if rtitem Isa “NOTESRICHTEXTITEM” then

else

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following