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

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(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
'problems

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
'Else
.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
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 objOutlookAttac h = 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 2129
>>
' 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.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
libary.

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.

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
5697
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
11
9215
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();
1
9210
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 =...
7
14711
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...
7
8827
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...
2
11097
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...
9
2290
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...
5
4861
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...
27
3746
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...
0
7349
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...
0
7590
Oralloy
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. ...
0
7735
jinu1996
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...
0
7688
tracyyun
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...
0
5885
agi2029
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...
0
3391
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...
0
3391
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1817
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
0
636
bsmnconsultancy
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.