Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

e-mail attachment from forms 6 via outlook

Status
Not open for further replies.

Chemist

Programmer
Jun 19, 1999
2
0
0
CH
I need to send an e-mail and an MS Word file as an attachement using OLE.<br>
I can get it to work fine with the exception of adding the attachement.<br>
The part of the procedure for the attachement is:<br>
<br>
<br>
msg_attch := OLE2.GET_OBJ_PROPERTY(message1, 'Attachments');<br>
attachment := OLE2.INVOKE_OBJ(msg_attch, 'add') ;<br>
OLE2.SET_PROPERTY(attachment, 'name', Attch); <br>
OLE2.SET_PROPERTY(attachment, 'position', 0);<br>
OLE2.SET_PROPERTY(attachment, 'type', 1); <br>
OLE2.SET_PROPERTY(attachment, 'source', Attch); <br>
args := OLE2.CREATE_ARGLIST;<br>
OLE2.ADD_ARG(args, Attch);<br>
OLE2.INVOKE(attachment, 'ReadFromFile', args);<br>
OLE2.DESTROY_ARGLIST(args);<br>
<br>
But I am uncertain about the meaning of the parametters being passed to outlook.<br>
Thanks for being helpful.
 
Hi,
we do it the same way but have a problem: the attached rtf-file desn't have a name in the created mail, so the users have to save the appended no-name-file and rename it to xxx.rtf before they can open it. Did anybody have similar problems and could give me a hint? We use MS Exchange Server 5.0
Thanks! Michael
 
Hi,

I am experiencing the same problems attaching a word document to an email using Forms 4.5, Outlook 97 and MS Exchange 5.5. I find the following code appears to make no difference to the attachment object:

OLE2.SET_PROPERTY(attachment, 'name', Attch);
OLE2.SET_PROPERTY(attachment, 'position', 0);
OLE2.SET_PROPERTY(attachment, 'type', 1); OLE2.SET_PROPERTY(attachment, 'source', Attch);

Any advice would be greatly appreciated.

Russ
 
The above method of attaching documents to emails from forms45 worked alright after I did a full installation of Outlook98.

Russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top