Mail Attachment using OLE
610973Dec 13 2007 — edited Mar 3 2008Hello Friends,
I am sending mail within form by using OLE.
I am unable to attach file as attachment to it.
this is my code.
Please help me.
-------only for outlook
--- THIS IS OLE CODE FOR MORE INFO. SEE HELP .
DECLARE
--PROCEDURE SendMail
objOutlook OLE2.OBJ_TYPE;
objMail OLE2.OBJ_TYPE;
objArg OLE2.LIST_TYPE;
BEGIN
objOutlook := OLE2.CREATE_OBJ('OUTLOOK.Application');
objarg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(objarg,0);
objMail := OLE2.INVOKE_OBJ(objOutlook,'CreateItem',objarg);
OLE2.DESTROY_ARGLIST(objarg);
OLE2.SET_PROPERTY(objmail,'To',:TO);
OLE2.SET_PROPERTY(objmail,'Subject',:SUBJECT);
OLE2.SET_PROPERTY(objmail,'Body',:BODY);
OLE2.INVOKE(objmail,'Send');
OLE2.INVOKE(objmail,'Display');
OLE2.RELEASE_OBJ(objmail);
OLE2.RELEASE_OBJ(objOutlook);
Message('Your mail sent successfully..............');
Message('Your mail sent successfully..............');
exception
when others then
message(sqlerrm);message(sqlerrm);
END;
Thanking You
Avinash Deokar