outlook and forms
i try to attach a file a mail (outlook), but when i send the mail this arrives without attachments, anybody can help me
there are something wrong in my code
my code(example) is the next
Declare
objOutlook OLE2.OBJ_TYPE;
objMail OLE2.OBJ_TYPE;
objArg OLE2.LIST_TYPE;
objAttach OLE2.OBJ_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);
objAttach := OLE2.GET_OBJ_PROPERTY(objmail, 'Attachments');
objarg := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG(objarg,'c:\temp\sqlnet.txt');
OLE2.SET_PROPERTY(objmail,'To','rhlecona@dca.pemex.com');
OLE2.SET_PROPERTY(objmail,'Subject','Email sent from Oracle Forms 6i');
OLE2.SET_PROPERTY(objmail,'Body','This is an email that was sent using OLE2 from Oracle forms 6i');
OLE2.INVOKE(objattach, 'Add', objarg);
OLE2.INVOKE(objmail,'Send');
OLE2.INVOKE(objmail,'Display');
OLE2.RELEASE_OBJ(objmail);
OLE2.RELEASE_OBJ(objOutlook);
OLE2.DESTROY_ARGLIST(objarg);
END;
thanks in advance
sorry for the english