INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

COM and Automation

How can I send an Email using OUTLOOK from VFP? by ramani
Posted: 28 May 01 (Edited 16 Oct 02)

**********************************************************
** How can I send an Email using OUTLOOK from VFP
**********************************************************
** by Subramanian.G (ramani)
**    FoxAcc Software
**    ramani_g@yahoo.com
**********************************************************
1. Outlook (2000 or 98 or 97) must be installed for this to work.

2. Save the following in a command button click event .. so that when you click this will be sent as an email
Or Save as prg file and run the file to send the email.

**********************************************************
o=createobject("outlook.application")
oitem=o.createitem(0)
oitem.subject="Email From VFP6"

oitem.to="ramani_g@yahoo.com"
** To send copy to addresses..
oItem.cc = "address1@someNet.com;address2@somenet.com"

oitem.body="This mail was sent from vfp using Outlook98"

** To attach a file
oitem.Attachments.Add("MyFullPath+MyFile+Ext")
** to attach one more file.. and you can repeat this.
oitem.Attachments.Add("MyFullPath+MyFile+Ext")

** to send it
oitem.send

** to clear up
o=.null.
**********************************************************
** EOF **
Ramani (Subramanian.G), FoxAcc, ramani_g@yahoo.com
**********************************************************
Evaluate this to make others know how useful is this

Back to Microsoft: Visual FoxPro FAQ Index
Back to Microsoft: Visual FoxPro Forum

My Archive

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close