Forum Discussion

turniporangementions's avatar
turniporangementions
Copper Contributor
Aug 30, 2024

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

  • ProcessIT's avatar
    ProcessIT
    Copper Contributor

    Things to check:

    1. Is Outlook Installed?
    2. Is Outlook the same bitness as Access? i.e both 32bit or both 64bit.
    3. 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).

Resources