Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email with VFP
Message
De
06/09/2005 13:27:18
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Email with VFP
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01047087
Message ID:
01047087
Vues:
47
When I run the source code listed below, I get this Program Error: OLE error code 0x80070005: Access is denied.

The error is on this line of code: oOutLookObject = CreateObject("Outlook.Application")
*******************************************************
#DEFINE MAILITEM 0
#DEFINE IMPORTANCELOW 0
#DEFINE IMPORTANCENORMAL 1
#DEFINE IMPORTANCEHIGH 2

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

WITH oEmailItem
.Recipients.Add("moe@3stooges.com") && uses the Recipients collection
.Subject = "Automation sample"
.Importance = IMPORTANCENORMAL
.Body = "This is easy!"
.Attachments.Add("c:\mydir\sample.txt") && Note that the fully qualified path and file is required.
.Send
ENDWITH

RELEASE oEmailItem
RELEASE oOutLookObject
***************************************************************

What can I do to fix this problem?



Thank You In Advance


Winfred Majors
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform