Emailing from excel with vba - error 429 on Windows 10 pcs

mjd

Board Regular
Joined
Feb 23, 2010
Messages
73
Hello,

My firm uses a number of macros to send excel files to business partners via outlook. This works wonderfully on Win 7 computers. We recently started deploying Windows 10 PCs, and we're getting error 429 on the following line:

Code:
 Set OutApp = CreateObject("Outlook.Application")

The full code snippet is:

Code:
    Dim OutApp As Object    Dim OutMail As Object


    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)


    On Error Resume Next
   ' Change the mail address and subject in the macro before you run it.
    With OutMail
        .SentOnBehalfOfName = "trading@myfirm.com"
        .To = "me@myfirm.com"
        .CC = ""
        .BCC = ""
        .Subject = "Trade Allocations:" & " " & ActiveWorkbook.Name
        .Body = "Hello," & vbNewLine & vbNewLine & "Please see attached for prime broker trade details." & vbNewLine & vbNewLine & "Trade Ops" & vbNewLine & "trading@myfirm.com"
        .Attachments.Add ActiveWorkbook.FullName
            ' You can add other files by uncommenting the following line.
            '.Attachments.Add ("C:\test.txt")
            ' In place of the following statement, you can use ".Display" to
            ' display the mail.
            '.Send
           If Left(ActiveWorkbook.Name, 5) = Format(Date, "mm-dd") Then
           .Send
            Else
        .Display
        End If
    End With
    On Error GoTo 0


    Set OutMail = Nothing
    Set OutApp = Nothing

This issue is consistent across all Windows 10 PCs. Has anyone encountered issues with using this function in Windows 10?

Thanks,
Mike
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top