I am writing a program using Notes API C++ 2.4 to convert Notes mail documents to HTML. I am detaching the Attachments to a file and would like to export the Attachment Icon to a Graphic File so I can use it in the Web Page. I can export other graphics just fine as TIFF files using RT.Export but get errors if I point the Cursors to the RTAttachment Object. I can also store it as a LNGraphic object but don’t see any method for putting it to a file. Does anyone have any suggestions?
Subject: Need to get the Attachment Icon using Notes C++ 2.4
I have tried several approaches but still can not get it to work. I created the code like below to export the graphic from a LNGraphic object but this causes an address exception.
// This is part of the code that searches through the Rich Text Item and identifies
else if (Obj.IsType(LNRTTYPE_ATTACHMENT))
{
c2 = Cursor;
Cursor++;
ProcessAttachment(rt, Obj, c2, HtmlString);
}
// This is the code in the ProcessAttachment routine to export the Graphic
LNGraphic AttachIcon;
// RTAtt is the Attachment Rich text object
RTAtt.GetGraphic(&AttachIcon);
LNRTCursor graphicStart;
AttachIcon.GetCursor(&graphicStart);
LNRTCursor graphicEnd = graphicStart;
graphicEnd++;
string tif = “image.tif”;
// Address exception on this export
rt.Export(tif.c_str(),graphicStart, graphicEnd);