Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email with VFP
Message
From
06/09/2005 14:09:49
 
 
To
06/09/2005 13:27:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01047087
Message ID:
01047110
Views:
12
See if this makes a difference.....

oOutlookobject=createobject("outlook.application")
oNameSpace=oOutlookobject.GetNameSpace("MAPI")
oEmailItem=oOutlookobject.createitem(olEmailItem)



>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
Previous
Reply
Map
View

Click here to load this message in the networking platform