Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email with VFP
Message
From
06/09/2005 13:27:18
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Email with VFP
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01047087
Message ID:
01047087
Views:
48
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
Next
Reply
Map
View

Click here to load this message in the networking platform