[GH-ISSUE #108] The remote procedure call failed #45

Closed
opened 2026-02-27 20:30:58 +03:00 by kerem · 3 comments
Owner

Originally created by @bmartins-EUDA on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/108

Originally assigned to: @bmartins-EUDA on GitHub.

Dear community,

Many thanks for this awesome project!

I just started playing around with the script and, when using the defaults, I am hitting the error below. Any hints?

  Process common templates @2024-04-22T16:07:21+01:00@
    'Int infrml.docx' (Signature ini index #4) @2024-04-22T16:07:21+01:00@
      Check permissions
        Allows
          Common: Template is classified as common template valid for all mailboxes
        Denies
          No group match for current mailbox, checking current user specific denies
          Group: Mailbox and current user are not member of any denied group
          No email address match for current mailbox, checking current user specific denies
          Email address: Mailbox and current user do not have any denied email address
          Replacement variable: No deny replacement variable evaluates to true
        Use template as there is at least one allow and no deny
      Outlook signature name: 'Int infrml'
      Create temporary file copy
      Replace picture variables
      Replace non-picture variables
      Export to HTM format

Unexpected error. Exit.
The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
At C:\temp\Set-OutlookSignatures_v4.11.0\Set-OutlookSignatures.ps1:5031 char:13
+             $script:COMWord.ActiveDocument.WebOptions.TargetBrowser = ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException


Clean-up @2024-04-22T16:07:52+01:00@
Exception calling "Quit" with "1" argument(s): "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)"
At C:\temp\Set-OutlookSignatures_v4.11.0\Set-OutlookSignatures.ps1:6684 char:9
+         $script:COMWord.Quit([ref]$false)
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : COMException

VERBOSE: Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM
Win32_process WHERE ProcessId = "2652",'queryDialect' = WQL,'namespaceName' = root\cimv2'.
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''instance' = Win32_Process: powershell.exe
(Handle = "2652"),'methodName' = SetPriority,'namespaceName' = root/cimv2'.
VERBOSE: Operation 'Query CimInstances' complete.
VERBOSE: Operation 'Invoke CimMethod' complete.

End script @2024-04-22T16:07:52+01:00@
PS C:\temp\Set-OutlookSignatures_v4.11.0>

Thanks for your help!

Bruno Martins

Originally created by @bmartins-EUDA on GitHub (Apr 22, 2024). Original GitHub issue: https://github.com/Set-OutlookSignatures/Set-OutlookSignatures/issues/108 Originally assigned to: @bmartins-EUDA on GitHub. Dear community, Many thanks for this awesome project! I just started playing around with the script and, when using the defaults, I am hitting the error below. Any hints? ``` Process common templates @2024-04-22T16:07:21+01:00@ 'Int infrml.docx' (Signature ini index #4) @2024-04-22T16:07:21+01:00@ Check permissions Allows Common: Template is classified as common template valid for all mailboxes Denies No group match for current mailbox, checking current user specific denies Group: Mailbox and current user are not member of any denied group No email address match for current mailbox, checking current user specific denies Email address: Mailbox and current user do not have any denied email address Replacement variable: No deny replacement variable evaluates to true Use template as there is at least one allow and no deny Outlook signature name: 'Int infrml' Create temporary file copy Replace picture variables Replace non-picture variables Export to HTM format Unexpected error. Exit. The remote procedure call failed. (Exception from HRESULT: 0x800706BE) At C:\temp\Set-OutlookSignatures_v4.11.0\Set-OutlookSignatures.ps1:5031 char:13 + $script:COMWord.ActiveDocument.WebOptions.TargetBrowser = ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [], COMException + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException Clean-up @2024-04-22T16:07:52+01:00@ Exception calling "Quit" with "1" argument(s): "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" At C:\temp\Set-OutlookSignatures_v4.11.0\Set-OutlookSignatures.ps1:6684 char:9 + $script:COMWord.Quit([ref]$false) + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : COMException VERBOSE: Perform operation 'Query CimInstances' with following parameters, ''queryExpression' = SELECT * FROM Win32_process WHERE ProcessId = "2652",'queryDialect' = WQL,'namespaceName' = root\cimv2'. VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''instance' = Win32_Process: powershell.exe (Handle = "2652"),'methodName' = SetPriority,'namespaceName' = root/cimv2'. VERBOSE: Operation 'Query CimInstances' complete. VERBOSE: Operation 'Invoke CimMethod' complete. End script @2024-04-22T16:07:52+01:00@ PS C:\temp\Set-OutlookSignatures_v4.11.0> ``` Thanks for your help! Bruno Martins
kerem closed this issue 2026-02-27 20:30:58 +03:00
Author
Owner

@GruberMarkus commented on GitHub (Apr 22, 2024):

Hi Bruno,

this is a very strange error, pointing to a problem with the Office/Word installation on your test client.

The error is strange because lots of steps happen in Word before the error occurs:

  • Word is started
  • The temporary copy of the template file opened
  • Picture replacement variables are replaced with real values
  • Non-picture replacement variables are replaced in different views
  • The temporary copy of the template file is saved

Also, Word problems typically already show up when Word is started, and not in the middle of the process.

The first error looks like the COM connection to Word gets lost for whatever reason. The second error is a consequential error, because after the unexpected error, the clean-up process tries to quit the background Word process.

Is this reproducable on multiple machines? Or does it only happen on a specific machine or with a specific user only?

<!-- gh-comment-id:2070178733 --> @GruberMarkus commented on GitHub (Apr 22, 2024): Hi Bruno, this is a very strange error, pointing to a problem with the Office/Word installation on your test client. The error is strange because lots of steps happen in Word before the error occurs: - Word is started - The temporary copy of the template file opened - Picture replacement variables are replaced with real values - Non-picture replacement variables are replaced in different views - The temporary copy of the template file is saved Also, Word problems typically already show up when Word is started, and not in the middle of the process. The first error looks like the COM connection to Word gets lost for whatever reason. The second error is a consequential error, because after the unexpected error, the clean-up process tries to quit the background Word process. Is this reproducable on multiple machines? Or does it only happen on a specific machine or with a specific user only?
Author
Owner

@bmartins-EUDA commented on GitHub (Apr 23, 2024):

Thanks @GruberMarkus!
A malfunctioning Word add-in was causing the issue. Solved!

<!-- gh-comment-id:2071768521 --> @bmartins-EUDA commented on GitHub (Apr 23, 2024): Thanks @GruberMarkus! A malfunctioning Word add-in was causing the issue. Solved!
Author
Owner

@GruberMarkus commented on GitHub (Apr 23, 2024):

My pleasure!

<!-- gh-comment-id:2071789067 --> @GruberMarkus commented on GitHub (Apr 23, 2024): My pleasure!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Set-OutlookSignatures-Set-OutlookSignatures#45
No description provided.