Are you sure that you have Outlook on the machine you are running this code on?
And what line does this error come up on?
Beth
>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