developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks




Export Image from body?
Alex Mas 02/08/2010 10:00 AM
Toolkits All Releases All Platforms


Hi all.
Can any body help me with exporting images from lotus notes messages using Lotus C\C++ API?
I am use next code.

LNRichText rt;
try {
if (curDoc.GetItem(MAIL_BODY_ITEM, &rt) == LNNOERROR) {
LNSTATUS st;

LNRTCursor grCursor;
if (rt.GetCursor(&grCursor) == LNNOERROR){
LNGraphic graphic;

char ErrorBuf[1000];
LNGRAPHICTYPE type;
for (; !grCursor.GotoNext(LNRTTYPE_GRAPHIC, &graphic); ){
type= graphic.GetGraphicType();

LNRTCursor c1=grCursor;
LNRTCursor c2=grCursor;
c2++;
st= rt.Export("C:\\a.jpeg", c1, c2); //1
st= rt.Export("C:\\a.bmp", c1, c2); //2
st= rt.Export("C:\\a.gif", c1, c2); //3
st= rt.Export("C:\\a.tif", c1, c2); //4

ErrorBuf[0] = '\0';
LNGetErrorMessage(st, ErrorBuf, 1000);
.....

at 1,2,3 not save "Can't find any export dll that supports the input file format"
at 4 rize an error 0x1e01 and also not save?

so How to save image from message to hard disk?
Thank You

Go back