473,543 Members | 2,348 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create Object error after ugrading to Access 2003

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!
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(Displ ayMsg 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

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

' Create the Outlook session.
Set objOutlook = CreateObject("O utlook.Applicat ion")

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

' Create the message.
Set objOutlookMsg = objOutlook.Crea teItem(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
.Body = Body & vbCrLf & vbCrLf
' End If

.Importance = 2 'High importance

' Add attachments to the message.
'If Not IsMissing(Attac hmentPath) Then
'*Set objOutlookAttac h = .Attachments.Ad d(AttachmentPat h)
'End If

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

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


Set objOutlook = Nothing
Set objOutlookMsg = Nothing
Set objOutlookRecip = Nothing
Set objOutlookAttac h = Nothing
SendEmail = True
Exit Function
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 2129
' Use late binding to avoid Outlook library version compatibility

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

...CreateObject ("Outlook.Appli cation.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

Dim objOutlook As Outlook.Applica tion

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.


*** 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

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 System.Collections Imports System.Configuration Imports System.Data Imports System.Data.Common Imports System.Reflection
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 C++. I find my self sometimes, trying Object app = Object(); Object *app = Object(); Object app = new Object();
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 used the late binding code: Dim objOutlook as object Set objOutlook = CreateObject("Outlook.Application") Set objOutlookMsg =...
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 when the routine runs. If Outlook is open, it runs fine, but doesn't seem to open another copy of Outlook (strange?) It has been working OK...
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and...
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 "ActiveX Component can't create object" out of my BldEmail routine. The routine is called to dynamically build an email note and put it in the...
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 server from the 1st machine, but I receive an 'HTTP/1.1 500 Internal Server error" from my Web Server. My userid/password are the same on all 3...
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 Exchange System Manager is running on the web server and Exchange SP2 has been installed. The IIS site is configured with Basic Authentication and users...
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 updates the same data in all other four tables in the right places. I know it would be possible by using the ForeignKeyConstraint object. I have created...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.