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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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