Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automate email recipient with VFP/Word/oDoc.sendmail()
Message
De
16/04/2003 07:58:02
 
 
À
15/04/2003 12:39:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00777857
Message ID:
00778259
Vues:
22
Hi Larry,

Why not use OutLook Automation to send the Word Doc as an attachment. Here is a block of code I found in this forum a few months back. I've used it with no problems since then.

#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

oOutLookObject = CreateObject("Outlook.Application")
oEmailItem = oOutLookObject.CreateItem(MAILITEM)

WITH oEmailItem
.To = "myself@mymailaddress.com;someone@somewhere.com"
.Subject = "Sending Email from within Foxpro to multiple recipients and with attachments"
.Importance = IMPORTANCENORMAL
.Body = "I'm now testing sending to multiple recipients in the .To value from within my app and mulitple attachments too."
.Attachments.Add("c:\temp\myfile.txt")
.Attachments.Add("C:\temp\junk.txt")
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject

HTH
Mike
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform