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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email with file attachment

Status
Not open for further replies.

budz

Programmer
May 3, 2001
17
Hi everyday and have a nice day.
Im emailing a report in text format using vfp6 and it works fine. Now, my problem is how could I attach 2 or more files in one message. Example in one message I would like to attach all files that start with letter A.
Thanks for the help.
 
HI
********************************************
o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.subject="Email From VFP6"
oitem.to="ramani_g@yahoo.com"
oitem.body="This mail was sent from vfp using Outlook98"
oitem.Attachments.Add("d:\winners\cmp\email.prg")

myPath = "specify a full path"
=ADIR(myAttach,myPath+"A*.txt")
FOR I=1 to ALEN(myAttach,1)
oitem.Attachments.Add(myPath+myAttach(I,1))
ENDFOR

oitem.send
o=.null.
**********************************************************
Note to add any path in the above suitably

Hope this helps :) ramani :-9
(Subramanian.G),FoxAcc, ramani_g@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top