Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SendObject causing an error in Access 2000

Status
Not open for further replies.

estiguar

Programmer
Jan 27, 2003
10
GB
Hi all,

I am having a problem with the "SendObject" method when converting MS Access 97 databases to MS Access 2000. According to the Miscrosoft support homepage, they know about the error and give a solution for that (However, I still experience some problems. When trying to run the code given by Microsoft, I get an error message 429 (ActiveX component can't create object). It seems that there is a problem when creating the "MAPI.Session" object.
I think it must have to do with a DLL, but I did not find out the error so far.
Does somebody else have a similar problem o r know how to solve this SendObject bug in Access 2000?

Would really appreciate help on that! It's driving me crazy!
Thanks!
 
Try to use the outlook function:

Option Compare Database
Option Explicit

'
'Function fctnOutlook(Optional FromAddr, Optional Addr, Optional cc, Optional BCC, _
' Optional Subject, Optional MessageText, Optional Vote As String = vbNullString, _
' Optional Urgency As Byte = 1, Optional EditMessage As Boolean = True)
'
'' Code sample from Accessory '
'Dim objOutlook As Outlook.Application
'Dim objOutlookMsg As Outlook.MailItem
'Dim objOutlookRecip As Outlook.Recipient
'Dim TestEmail As Variant, I As Integer
'Dim SafeItem
'Set objOutlook = CreateObject("Outlook.Application")
'Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
'Set SafeItem = CreateObject("Redemption.SafeMailItem")
''Create an instance of Redemption.SafeMailItem
'SafeItem.Item = objOutlookMsg 'set Item property
'With SafeItem
'
' If Not IsMissing(FromAddr) Then
' .SentOnBehalfOfName = FromAddr
' End If
'
' If Not IsMissing(Addr) Then
' TestEmail = Split(Addr, ";")
' For I = 0 To UBound(TestEmail)
' Set objOutlookRecip = .Recipients.Add(TestEmail(I))
' Next I
' objOutlookRecip.type = olTo
' End If
'
' If Not IsMissing(cc) Then
' TestEmail = Split(cc, ";")
' For I = 0 To UBound(TestEmail)
' Set objOutlookRecip = .Recipients.Add(TestEmail(I))
' Next I
' objOutlookRecip.type = olCC
' End If
'
' If Not IsMissing(BCC) Then
' Set objOutlookRecip = .Recipients.Add(BCC)
' objOutlookRecip.type = olBCC
' End If
'
' If Not IsMissing(Subject) Then
' .Subject = Subject
' End If
'
' If Not IsMissing(MessageText) Then
' .Body = MessageText
' End If
'
' If IsNull(Vote) = False Then
' .VotingOptions = Vote
' End If
'
' Select Case Urgency
' Case 2
' .Importance = olImportanceHigh
' Case 0
' .Importance = olImportanceLow
' Case Else
' .Importance = olImportanceNormal
' End Select
'
' For Each objOutlookRecip In .Recipients
' objOutlookRecip.Resolve
' Next
'
' If EditMessage Then
' .Display
' Else
' .Save
' .Send
' End If
'
'End With
'Set objOutlook = Nothing
'
'End Function
 
Thank you checkOut...have tried it, but I still have a problem in the following line of the VB code:

Set SafeItem = CreateObject("Redemption.SafeMailItem")

It says that the object can not be created (Run-time error 429). I have referenced the Microsoft Outlook 9.0 Object Library, but this did not help. Any tips?
Thanks anyway for your help!
 
Hi,
On a few computers in our network i've the same troubles.
I check it out for u and bring it back...

Gerard
 
This is using the redemption dll, which is great. But you have to go out and get it at and then install it and set a reference to it.
Jeremy ==
Jeremy Wallace
AlphaBet City Dataworks
See the Developers' section

Please post in the appropriate forum and include 1) a descriptive subject 2) code and SQL, if referenced,
and 3) expected results. See thread181-473997
 
Thank you Gerard & Jeremy,
Will try that!
Roberto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top