Access 2003 and Outlook problem

Hi EE

Part of my open outlook

Set OutApp = CreateObject("Outlook.Application")

On this line I get the error
Active X component can’t create object

In references I have checked
Microsoft Active X Data Objects 2.1 Library

Searching the web I checked problems that can cause this error and all seems to be ok

What should I do to rectify this error

chestera
chesteraAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill RossProgrammerCommented:
Hi,

Set OutApp = CreateObject("Outlook.Application")

Post your entire code - up to this line at least..  

Regards,

Bill
0
chesteraAuthor Commented:
BillDenver

HI Bill
Sorry for the delay been away. I will post the code soonest

Alan
0
chesteraAuthor Commented:
BillDenver

Hi Bill

Here is code I am playing with

Dim OutApp As Outlook.Application
    Dim OutMail As Outlook.MailItem
    Dim EmailAddress As String
    Set OutApp = CreateObject("Outlook.Application") ‘-------------------Error here
    Set OutMail = OutApp.CreateItem(olMailItem)
    Forms(1).C1Email.SetFocus
    EmailAddress = Forms(1).C1Email.Text
    With OutMail
        .To = EmailAddress
        .CC = ""
        .BCC = ""
        .Subject = ""
        .Body = ""
        .Display   'or when your ready to really email use .Send
   
    End With
       
    Set OutMail = Nothing
    Set OutApp = Nothing

Alan
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Bill RossProgrammerCommented:
Hi,

This syntax is incorrect.

Delete this line
Set OutApp = CreateObject("Outlook.Application") ‘-------------------Error here

as you already have the object set in line
Dim OutApp As Outlook.Application

You are essentially setting the object twice.

Regards,

Bill
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
chesteraAuthor Commented:
BillDenver

Hi Bill

Thank you for that info I didn't notice. It stands out like you know what

Alan
0
Bill RossProgrammerCommented:
(-;

Regards,

Bill
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Development

From novice to tech pro — start learning today.