Type mismatch error when getFirstitem
0 pts.
0
Q:
Type mismatch error when getFirstitem
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: Oct 12 2007  6:33 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
520 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
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
...
Last Answered: Feb 29 2008  2:40 PM GMT by AGuirard   520 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



0