Forum Discussion
turniporangementions
Aug 30, 2024Copper Contributor
Running my 32 bit access on a 64 bit computer works, But wont let me email !
I have moved my Database from a 32 bit operating systerm to a 64 bit computer. I am Running Microsoft Access Runtime 2013 and it operates my database just fine, Except when my database goes to send a email, It creates the pdf files then I get this error [ Active X component cant create object ]
Thanks for any help , Bob
This is part of my email code to Outlook:
Dim myitem As Object
Dim myout As Object
Set myout = CreateObject("Outlook.Application")
Set myitem = myout.CreateItem(0)
With myitem
.To = strMail
.Cc = Nz(DLookup("EmailCC", "tblOwnerInfo", "OwnerID = " & lngID), "")
.Bcc = Nz(DLookup("EmailBCC", "tblOwnerInfo", "OwnerID = " & lngID), "")
.Subject = "Your Statement/Invoice" & " from " & Nz(DLookup("[CompanyName]", "tblCompanyInfo"))
.Body = strBodyMsg
.Attachments.Add myfile1
If ckbTerms = True Then
.Attachments.Add myfile3
End If
If mytot > 0 And ckbStateOnly = False Then
.Attachments.Add myfile2
End If
.Send
End With
Set myitem = Nothing
Set myout = Nothing
cbOwnerName.SetFocus
Case Else
Exit Sub
End Select
ExitProc:
2 Replies
Sort By
- George_HepworthSilver Contributor
Do you have Legacy Outlook installed? Or do you have "New" Outlook installed?
New Outlook does not support Office automation, so if you also acquired New Outlook in the transfer to a different computer, your code to send email from Access will not work.
There are alternatives, just not attractive ones.https://www.accessforever.org/post/the-new-outlook-and-access-vba
https://youtu.be/Gd2upJx-zgE?si=5XaxDkpcnrcqXE7P
- ProcessITCopper Contributor
Things to check:
- Is Outlook Installed?
- Is Outlook the same bitness as Access? i.e both 32bit or both 64bit.
- Is it finding the outlook object ? After the line Set myout = CreateObject("Outlook.Application") -Try adding this
Debug.print myout Is Nothing
If so try adding a reference to Outlook and debugging (early binding).