Asked by:
Emailing no longer works with Windows 10!

Question
-
When I try to email now from Access 2013 with Windows Live Coding, I am getting this error
"There is no email program associated to preform the request........"
Do I need to recode or do I install Windows Live to Windows 10
Thanks for any help...........Bob
xxx
Tuesday, January 10, 2017 11:22 PM
All replies
-
Hi Bob,
If you had Windows Live installed on your old machine and it's not installed on the new machine, then I think yes, you'll have to install it now.
Just my 2 cents...
Tuesday, January 10, 2017 11:43 PM -
Thanks DB, suppose installing window live is my only option..........Bob
xxx
Tuesday, January 10, 2017 11:50 PM -
Thanks DB, suppose installing window live is my only option..........Bob
xxx
Not necessarily if your code is not specific to Windows Live. For example, if you're simply using the SendObject method, then you can simply install Outlook or Thunderbird instead of Windows Live Mail.
Just a thought...
Tuesday, January 10, 2017 11:55 PM -
I have to codes one for Outlook (Below) and the other for Windows Live that was before Windows 10 came along. So if I download Thunderbird and make it my default browser my Outlook code will work with it? Thanks Bob
If IsNull(tbEmailOption.value) = True Or tbEmailOption.value = vbNullString Then
MsgBox "Please make a Email Format Selection!" & vbCrLf & "Close and Re-Open Statements", vbApplicationModal + vbInformation + vbOKOnly
Exit Sub
End If
On Error GoTo Err_Command35_Click
If Me.Dirty = True Then
Me.Dirty = False
Dim myfile1 As String, myfile2 As String, myfile3 As String
End If
Dim mydir As String
mydir = Left(CurrentDb.Name, Len(CurrentDb.Name) - Len(Dir(CurrentDb.Name)))
Dim lngID As Long, strMail As String, strBodyMsg As String, _
blEditMail As Boolean, sndReport As String, strCompany As String
Dim msgPmt As String, msgBtns As Integer, msgTitle As String, msgResp As Integer, tbAmount As String
Dim strFormat As String
Dim mytot As Long
mytot = DCount("[InvoiceID]", "qrySelInvoices", "")Select Case Me.tbEmailOption.value
Case "ADOBE"
strFormat = acFormatPDF
myfile1 = mydir & "Statement.pdf"
myfile2 = mydir & "Invoices.pdf"
myfile3 = mydir & "Terms_and_Conditions.pdf"
Case "WORD"
strFormat = acFormatRTF
myfile1 = mydir & "Statement.rtf"
myfile2 = mydir & "Invoices.rtf"
myfile3 = mydir & "Terms_and_Conditions.rtf"
Case "SNAPSHOT"
strFormat = acFormatSNP
myfile1 = mydir & "Statement.SNP"
myfile2 = mydir & "Invoices.SNP"
myfile3 = mydir & "Terms_and_Conditions.SNP"
Case "TEXT"
strFormat = acFormatTXT
myfile1 = mydir & "Statement.txt"
myfile2 = mydir & "Invoices.txt"
myfile3 = mydir & "Terms_and_Conditions.txt"
Case "HTML"
strFormat = acFormatHTML
myfile1 = mydir & "Statement.htm"
myfile2 = mydir & "Invoices.htm"
myfile3 = mydir & "Terms_and_Conditions.htm"
Case Else ' catch all others
strFormat = acFormatRTF
myfile1 = mydir & "Statement.htm"
myfile2 = mydir & "Invoices.htm"
myfile3 = mydir & "Terms_and_Conditions.htm"
End SelectSelect Case Me.OpenArgs
Case "OwnerStatement"
sndReport = "Client_Statement"
lngID = Nz(Me.cbOwnerName.Column(0), 0)
strMail = OwnerEmailAddress(lngID)
tbAmount = Nz(Me.cbOwnerName.Column(5), 0)
strBodyMsg = "To: "
strBodyMsg = strBodyMsg & Nz(DLookup("[ClientTitle]", "tblOwnerInfo", "[OwnerID]=" & lngID), " ") & " "
strBodyMsg = strBodyMsg & Nz(DLookup("[OwnerFirstName]", "tblOwnerInfo", "[OwnerID]=" & lngID), " ") & " "
strBodyMsg = strBodyMsg & Nz(DLookup("[OwnerLastName]", "tblOwnerInfo", "[OwnerID]=" & lngID), "Client")
strBodyMsg = strBodyMsg & "," & Chr(10) & Chr(10) & Chr(13) _
& "Please find attached your Statement/Invoices, Dated:" & " " & Format(Date, "d-mmm-yyyy") & Chr(10) & "Your Statement Total: " & Format(tbAmount, "$ #,##.00") & Chr(10) & Chr(10) & Nz(DLookup("[EmailMessage]", "tblCompanyInfo"), "") & eMailSignature("Best Regards", True) & Chr(10) & Chr(10) & DownloadMessage("PDF") _
DoCmd.OutputTo acOutputReport, sndReport, strFormat, myfile1, False
If ckbTerms = True Then
DoCmd.OutputTo acOutputReport, "TermsAndConditions", strFormat, myfile3, False
End If
If mytot > 0 And ckbStateOnly = False Then
DoCmd.OutputTo acOutputReport, "Invoice", strFormat, myfile2, False
End If
CurrentDb.Execute "UPDATE tblOwnerInfo " & _
"SET EmailDateState = Now() " & _
"WHERE OwnerID = " & lngID & " AND " & cbOwnerName.Column(0), dbFailOnError 'OwnerChange
Dim myitem As Object ' Outlook.MailItem
Dim myout As Object 'Outlook.Application
Set myout = CreateObject("Outlook.Application") ' New Outlook.Application
Set myitem = myout.CreateItem(0) '(olMailItem)
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 'EditMessage:=blEditMail
.Attachments.Add myfile1
If ckbTerms = True Then
.Attachments.Add myfile3
End If
If mytot > 0 And ckbStateOnly = False Then
.Attachments.Add myfile2
End If
'On Error Resume Next
.Send
'On Error GoTo ErrorHandler
End With
Set myitem = Nothing
Set myout = Nothing
cbOwnerName.SetFocus
Case Else
Exit Sub
End Select
ExitProc:Exit_Command35_Click:
Exit SubErr_Command35_Click:
MsgBox " Close this Form and Re-Open it!"
Resume Exit_Command35_Click
'ErrorHandler:'msgTitle = "Untrapped Error"
' msgBtns = vbExclamation'Select Case Err.Number
'User cancelled message (2293 & 2296 are raised
'by Outlook, not Outlook Express).
'Case 2501, 2293, 2296
'Case Else
' MsgBox "Error Number: " & Err.Number & Chr(13) _
'& "Description: " & Err.Description & Chr(13) & Chr(13) _
'& "(frmBillStatement SendMailButton_Click)", msgBtns, msgTitle
' End SelectResume ExitProc
End Subxxx
Wednesday, January 11, 2017 12:12 AM -
Hi Bob,
Unfortunately, no. Since you're using Outlook automation, i.e. Set myout = CreateObject("Outlook.Application"), then you'll need Outlook for the code to work. If you want to use Thunderbird, you will have to use a different code like the SendObject method or maybe something like: CreateObject("Thunderbird.Application") - just a guess on this one.
Hope it helps...
Wednesday, January 11, 2017 1:27 AM -
Hi,
As far as I know, windows live is built-in in win7. If you want to use it in Win10, I think you need to install it.
According to the error message, I think it is because there is no default application to send mails.
Regards,
Celeste
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Monday, January 16, 2017 8:18 AM