Reference to Outlook

R

Rick

I use code that includes the following to send email from
my database. My computer with everything reinstalled and
now this brings up Outlook Express instead out Outlook.
What do I need to adjust?

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

Thanks.

Rick
 
R

Ruskin Hardie

Make sure that Outlook (not outlook express) is your default app for mail...
Alternatively, you could try;

Set objOutlook = CreateObject("Outlook.Application.9")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top