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:
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:
Any help would be appreciated.
Greetings,
RV
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