It is not a good idea to put references ahead of the default 4.
Create a new database, check the references, and put those in the same position in your database.
Redemption.SafeMailItem Access VBA error
I am trying to send an email on Win10 through Access 2007. The email sends fine on an older Win7/Access2007 PC, but not on the Win10 PC.
When I click on "Send" in Access, VBA runs though hundreds of lines of code, but when it reaches the area about Redemption and Safe Mail, it jumps to the error handler and jumps back to Access with a Message Box stating "Recipients.Add invalid message" and exiting the send procedure.
(This project was initially made on Access 97 and bandaged up through the years to keep it working, and now I am trying to heave it up to O365)
The VBA references on both clients of the Win7 and Win10 PCs are (basically) the same:
- Visual Basic for Applications
- Micrsoft Access 12.0 Object Library
- SafeOutlook Library
- Microsoft Outlook 14.0 Object Library* (12.0 on the Win7 PC)
- ACG PDF Pro Plus Mail Library
- Microsoft Office 12.0 Access database engine Object Library
- Microsoft Visual Basic for Applications Extensibility 5.3
- OLE Automation
Here is some of the code for the sendMail procedure:
Dim objSafeMailItem As Redemption.SafeMailItem
Dim olMailItem As Outlook.MailItem
Set objSafeMailItem = New Redemption.SafeMailItem
objSafeMailItem.item = olMailItem
Set toRecip = objSafeMailItem.Recipients.Add(rst!Email) 'last line before going to err handler!!!
toRecip.Type = olTo
'objSafeMailItem.Recipients.Add rst!Email
If Me.cboMessageType = 1 Then
...
Error_Handler:
MsgBox Err.Description
If IsFormOpen("frmWorking") = True Then DoCmd.Close acForm, "frmWorking" 'error message returns here!
Resume Exit_Procedure
Resume
Any ideas would be a huge help! :D
Microsoft 365 and Office | Access | Development
Outlook | Windows | Classic Outlook for Windows | For business
Developer technologies | Visual Basic for Applications
1 answer
Sort by: Most helpful
-
Tom van Stiphout 1,861 Reputation points MVP Volunteer Moderator
2022-03-01T14:06:38.577+00:00