Create email in Outlook Express 429 error

RV

Registered User.
Local time
Today, 16:32
Joined
Feb 8, 2002
Messages
1,115
I'm trying to generate an email in Outlook Express version 6.00.2800.1123
Acces version is Access97 SR2.

I want to use the CreateObject method ,not the SendObject method.
I've created a form with a button.
This is the VBA code attached to the On Click event of the button:

Code:
Private Sub Knop0_Click()

Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Dim strBODY As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
OutApp.Visible = True

    With OutMail
    
        .To = "nep@adres.nl"
        .CC = ""
        .BCC = ""
        .Subject = "TEST TEST TEST"
        .Body = strBODY
        .Send
    End With

End Sub

When the code is run, this error pops up:

Error 429, ActiveX can't create object.
This line is marked:

Set OutApp = CreateObject("Outlook.Application")

I understand this most probably is caused by a Reference which should by added through Options -> References.
The problem is, WHICH Reference would be needed?
I tried these References, no success:

  • Microsoft Outlook 8.0 Object Library
  • Microsoft Outlook 9.0 Object Library

Any help would be appreciated.

Greetings,

RV
 
Is there nobody who can help me sorting this out?
 

Users who are viewing this thread

Back
Top Bottom