Hello...
I want to send an e-mail, with an attachment, from Forms using OLE2. I can get the e-mail to send fine (I have shown the code below), but am having trouble trying to figure out how to attach a document to the e-mail. Can anyone give me some help in adding an attachment to the code below?
args OLE2.LIST_TYPE;
db OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
session OLE2.OBJ_TYPE;
BEGIN
session := OLE2.CREATE_OBJ ( 'Notes.NotesSession' );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, ' ' );
OLE2.ADD_ARG ( args, 'names.nsf' );
db := OLE2.INVOKE_OBJ ( session, 'GetDatabase', args );
OLE2.DESTROY_ARGLIST ( args );
doc := OLE2.INVOKE_OBJ ( db, 'CreateDocument' );
OLE2.SET_PROPERTY(doc,'SendTo','test.user@comp.com');
OLE2.SET_PROPERTY(doc,'SendTo','test.mgr@comp.com');
OLE2.SET_PROPERTY(doc,'Subject','Month End Report' );
OLE2.SET_PROPERTY(doc,'Body','Your Month End Report');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, 0 );
OLE2.INVOKE ( doc, 'Send', args );
OLE2.DESTROY_ARGLIST ( args );
END;
OLE2.RELEASE_OBJ ( session );
OLE2.RELEASE_OBJ ( db );
OLE2.RELEASE_OBJ ( doc );
Thanks In Advance for your help!!
I want to send an e-mail, with an attachment, from Forms using OLE2. I can get the e-mail to send fine (I have shown the code below), but am having trouble trying to figure out how to attach a document to the e-mail. Can anyone give me some help in adding an attachment to the code below?
args OLE2.LIST_TYPE;
db OLE2.OBJ_TYPE;
doc OLE2.OBJ_TYPE;
session OLE2.OBJ_TYPE;
BEGIN
session := OLE2.CREATE_OBJ ( 'Notes.NotesSession' );
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, ' ' );
OLE2.ADD_ARG ( args, 'names.nsf' );
db := OLE2.INVOKE_OBJ ( session, 'GetDatabase', args );
OLE2.DESTROY_ARGLIST ( args );
doc := OLE2.INVOKE_OBJ ( db, 'CreateDocument' );
OLE2.SET_PROPERTY(doc,'SendTo','test.user@comp.com');
OLE2.SET_PROPERTY(doc,'SendTo','test.mgr@comp.com');
OLE2.SET_PROPERTY(doc,'Subject','Month End Report' );
OLE2.SET_PROPERTY(doc,'Body','Your Month End Report');
args := OLE2.CREATE_ARGLIST;
OLE2.ADD_ARG ( args, 0 );
OLE2.INVOKE ( doc, 'Send', args );
OLE2.DESTROY_ARGLIST ( args );
END;
OLE2.RELEASE_OBJ ( session );
OLE2.RELEASE_OBJ ( db );
OLE2.RELEASE_OBJ ( doc );
Thanks In Advance for your help!!