Runtime -2147023170 error on MailMerge

kckay

Board Regular
Joined
Nov 8, 2010
Messages
134
We utilize Excel worksheets in a workbook to help document site inspections. From these worksheets, a findings letter is produced. The VBA written is included in Excel as an Add-In.

My department has 20 machines ranging from desktops to laptops to Surface Pros 3/4 to HP Elite X2 tables. All machines are W10/Office 2013. All of the machines use the exact same Add-In containing my code.

I have 1 HP Elite X2 (out of 5) that will return

"Run-time error '-2147023170 (800706be)':
Automation error
The remote procedure call failed."

I do not get this failure from any other machine.

The code identifies as failing on the first line (by highlighting it):

Code:
    With appWD.ActiveDocument.MailMerge
        .OpenDataSource Name:=fname, SQLStatement:="SELECT * FROM
[listing]"
        .destination = wdSendToNewDocument
        .SuppressBlankLines = True
        .Execute Pause:=False
    End With

If I take the workbook to another machine and run the mailmerge code, it will generate the letter correctly and without fail.

Trust Center settings are the same between all 25 machines. So are the group policies and individual permissions.

It appears the problem is due to the installation of Office 2013, but trying to convince my IT department of that is interesting to say the least.

I am having the 'owner' of that machine double check the VBAProject references. He let me know they are set the same as all of the other machines.

What direction should I be looking? I am stumped.

Much appreciated.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Macropod

Retired Moderator
Joined
Aug 27, 2007
Messages
3,543
It appears the problem is due to the installation of Office 2013, but trying to convince my IT department of that is interesting to say the least.
A faulty Office installation is the most likely culprit. A repair of the Office installation (much easier than uninstalling & reinstalling) is the usual first remedial step.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,466
Messages
5,636,440
Members
416,919
Latest member
twc2c

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
Top