473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Create Object error after ugrading to Access 2003

Hi,
I created an application in MS Access 2000. Since upgrading to MS
Access 2003 I have been finding all sorts of strange things. My current
problem is with the function below. Ig get an error "429 ActiveX
Componant Can't Create Object"
How can I correct this error?
Thanks very Much!
Kathy
Here is the function:
' By Glen Appleton found in Google Group

'================================================= ======================
====

' Send an email message from Access in default or HTML format
'================================================= ======================
====

Public Function SendEmail(DisplayMsg As Boolean, _
SendTo As String, _
Subject As String, _
Body As String, _
Optional CCTo As String, _
Optional BCCTo As String, _
Optional AttachmentPath) As Boolean
On Error GoTo SendEmail_Err
' Use late binding to avoid Outlook library version compatibility
'problems

Dim objOutlook As Object ' Outlook application
Dim objOutlookMsg As Object ' Outlook message
Dim objOutlookRecip As Object ' Outlook recipients
Dim objOutlookAttach As Object ' Outlook attachment

' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")

' Check session and exit if offline
'If objOutlook.Session.Offline Then GoTo EndSendMessage

' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(0)

With objOutlookMsg
' Add the To recipient(s) to the message.
.To = SendTo

' Add the CC recipient(s) to the message.
If Not CCTo = "" Then .CC = CCTo

' Add the BCC recipient(s) to the message.
'If Not BCCTo = "" Then .BCC = BCCTo

' Set the Subject, Body, and Importance of the message.

.Subject = Subject

'If InStr(1, Body, "<html>", vbBinaryCompare) >= 1 Then
' .HTMLBody = Body & vbCrLf & vbCrLf
'Else
.Body = Body & vbCrLf & vbCrLf
' End If

.Importance = 2 'High importance

' Add attachments to the message.
'If Not IsMissing(AttachmentPath) Then
'*Set objOutlookAttach = .Attachments.Add(AttachmentPath)
'End If

' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next

' Should we display the message before sending?
If DisplayMsg Then
.Display
Else
' .Save
'.Send
End If
End With

EndSendMessage:

Set objOutlook = Nothing
Set objOutlookMsg = Nothing
Set objOutlookRecip = Nothing
Set objOutlookAttach = Nothing
SendEmail = True
Exit Function
SendEmail_Err:
MsgBox "The e-mail has been canceled."
SendEmail = False
Exit Function

End Function


*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #1
1 2106
>>
' Use late binding to avoid Outlook library version compatibility
'problems
<<

The above may be your problem, or part of your problem. I believe
Access2003 is stricter on stuff as far as

...CreateObject("Outlook.Application.Version")

If you are using Outlook11 I think you need to add that to the
CreateObject statement. Also, I would use early binding instead of late
binding --- make sure you have a reference to the correct Outlook
libary.

Dim objOutlook As Outlook.Application
...

It is much better to generate version compatability problems at the
beginning of a project than farther down the road when you have already
developed stuff and late binding is just not going to forgive you any
longer for incompatability issues. Note: the less forgiving a system is
- the less undesired surprises you get down the road.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ian | last post by:
The beginning of my assembly that I am getting the access error from looks like this. ********************************* Imports System.EnterpriseServices Imports System Imports...
11
by: DrUg13 | last post by:
In java, this seems so easy. You need a new object Object test = new Object() gives me exactly what I want. could someone please help me understand the different ways to do the same thing in...
1
by: Blake | last post by:
I'm using late binding to create Outlook email from an Access2K database. I am not referencing the Microsoft Office 9.0 Object Library nor the Microsoft Outlook 9.0 Object Library. Instead, I have...
7
by: Bob Darlington | last post by:
I'm using Access 2002 to try to open Outlook 2002 (late binding) using: Dim objOutlook As Object Set objOutlook = CreateObject("Outlook.Application") I get the above error if Outlook is closed...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
2
by: Susan Bricker | last post by:
Hi. I have a routine (BldEmail) that is causing an error on my user's PC but not on mine. HELP!!! I have to fix this tonight. She reports an error with err.number=429 and the error message...
9
by: Marc Miller | last post by:
Hi all, I have 2 dev. machines, the 1st is Win 2000 with .NET 7.0 and the 2nd is XP Pro with .NET 2003. My Web Server is Win 2000 Server with IIS 5.0. I can create a new project on my test...
5
by: Michael | last post by:
Hello, I've created an ASP web page where users in our organization can create Active Directory computer accounts. The web page is running on a Server 2003 SP1 IIS 6 installation. The...
27
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.