Windows error 0x80010001, -2147418111

Detailed Error Information

RPC_E_CALL_REJECTED[1]

MessageCall was rejected by callee.
Declared inwinerror.h

HRESULT analysis[2]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode1 (0x001)
NameFACILITY_RPC[2][1]
DescriptionThe source of the error code is an RPC subsystem.[2][1]
Error Code1 (0x0001)

Questions

19votes
13answers

how to solve Exception:Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) in C#?

I have written a C# code in console application to open two excels and copy and paste data from one excel to another excel. It was working fine until the destination excel's visibility was true. But I need to hide the excel at the time of execution. So I changed [...] read more
c#
excel
interop
comexception
10votes
7answers

Catch Exception with Condition

Note: I am very happy to tell you that exception filters are now in the C# 6.0 language. This is a thought experiment, I'm interested in your opinion: Does it make sense to you? Do you know whether something similar has already been proposed for the C# programming language? I [...] read more
c#
exception
syntax
7votes
2answers

How do I avoid RPC_E_CALL_REJECTED exceptions when performing PowerPoint automation?

When my code tries to create a new instance of Microsoft.Office.Interop.PowerPoint.Application, I sometimes get the following exception: System.Runtime.InteropServices.COMException (0x80010001): Retrieving the COM class factory for component with CLSID {91493441-5A91-11CF-8700-00AA0060263B} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)). at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType) at [...] read more
c#
powerpoint
office-interop
comexception
6votes
2answers

call was rejected by callee

My application was working fine on my win 7 64 bit machine. I tried to run the winforms visual studio 2008 .NET C# application on a different win 7 64 bit machine and now I am getting this error: See the end of this message for details on invoking just-in-time [...] read more
c#
.net
windows
winforms
visual-studio-2008
6votes
2answers

Automatically a debug process from C# code and read register values

I'm looking for a way to read the edx registry at a certain address like asked in this question: Read eax register Although my solution needs to be in C# and I tried to make it, what I got at this moment is: public static IntPtr GetEdx(IntPtr address, Process process) [...] read more
c#
windows
debugging
winapi
process
5votes
4answers

is there a better way to handle RPC_E_CALL_REJECTED exceptions when doing visual studio automation?

this is what I'm currently doing: protected void setupProject() { bool lbDone = false; int liCount = 0; while (!lbDone && liCount < pMaxRetries) { try { pProject.ProjectItems.Item("Class1.cs").Delete(); lbDone = true; } catch (System.Runtime.InteropServices.COMException loE) { liCount++; if ((uint)loE.ErrorCode == 0x80010001) { // RPC_E_CALL_REJECTED - sleep half sec then try [...] read more
c#
visual-studio-2010
code-generation
3votes
2answers

Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))

I have a small C# Winforms Application that is using Word.Interop to Take a Single Mail Merge Document, copy each section, paste that section into it's own document, and save it individually. Error [https://i.stack.imgur.com/Q45EN.jpg] I keep (sometimes randomly) getting the error message: Call was rejected by callee. (Exception from HRESULT: [...] read more
c#
automation
ms-word
office-interop
mailmerge
2votes
2answers

getting Call was rejected by callee exception in VSTO ( Word Application )

It's been 3 days that I'm fooling around VSTO (Word application) I want to create a report in a word document. I already set some bookmarks in the template document. so my application just opens the template document and search for the each bookmark and replace the bookmark with a [...] read more
c#-4.0
ms-word
vsto
2votes
2answers

C# Outlook - Call Rejected By Callee

Trying to add an event to Outlook calendar through my event registration app using asp.net/C#. Getting call was rejected by callee error when trying to initialize (line 1). How do I overcome this issue? Error: "Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following [...] read more
c#
.net
outlook
calendar
1vote
2answers

Opening Excel - Call rejected by Callee

I am trying to open Excel with Com addins via PowerShell and keep getting a "Call was rejected by callee" error, please see code below. Any thoughts? $a = New-Object -ComObject Excel.Application $a.Visible = $True Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) At line:2 char:1 + $a.Visible [...] read more
excel
powershell
1vote
0answers

c++ Excel COM automation: querying server status

I have a problem and I have done several day's worth of research but found no answer. I have a c++ application that controls Excel programmatically. Specifically I use VS2017 and MS Office 2019. To cut a long story short, I don't seem to have away to get feedback from [...] read more
c++
automation
excel-2019
1vote
1answer

how to solve HRESULT: 0x80010001 (RPC_E_CALL_REJECTED) in C# : Excel Interop?

I'm working on a project with C#/WPF, I read and write in multiple Excel files with Microsoft.Office.Interop.Excel. I face this error randomly when I read the Excel file, sometimes when I read line 1382 sometimes 2218 etc PS : My Office Pack is activated. I tried to use : Thread.Sleep(100); [...] read more
c#
excel
wpf
comexception
1vote
1answer

Attach Visual Studio 2013 to managed and C++ processes using multiple engines

I am trying to get Visual Studio 2013 to programmatically attach the Debugger to a child process, which I start using the Process.Start method. Process.Start(ProcessStartupInformation startupInfo) var subProcess = Process.Start(startInfo); // TODO: how to find the right VS instance? var dte2 = (EnvDTE80.DTE2)Marshal.GetActiveObject("VisualStudio.DTE.12.0"); var debugger2 = (EnvDTE80.Debugger2)dte2.Debugger; Process2 processToAttachTo = [...] read more
c#
c++
visual-studio-2013
visual-studio-debugging
1vote
2answers

Can't get Outlook.Application interop work in my MVC 4 project

I've been trying to use this interop in my MVC 4 project. I tried to make it simple just to get the idea. but I get an error "Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001 Call was rejected by callee. [...] read more
model-view-controller
outlook-addin
1vote
2answers

System.Runtime.InteropServices.COMException (0x80010001)

I have developed an intranet application , In which a dropdownlist is binded with outlook's global address list data . The code is as shown below : Dictionary list = new Dictionary(); // Create the Outlook application. Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); // Get the NameSpace information. Microsoft.Office.Interop.Outlook.NameSpace oNS = [...] read more
c#-4.0
office-interop
outlook-2007
1vote
0answers

microsoft word and call rejected by callee

I have word incorporated in my winform and I get the following error: System.Runtime.InteropServices.COMException (0x80010001): Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) at Microsoft.Office.Interop.Word.DocumentClass.Activate() when the code execute the line of code "doc.ActiveWindow". Does anyone know or have any idea of how to catch this exception and [...] read more
c#
wpf
ms-word
1vote
1answer

Error when running envdte project from console application

I am trying to make work some code I created in an add-in, from console. I am getting errors: Error in solution file: C:\x\x.sln System.Runtime.InteropServices.COMException (0x80010001): Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) at EnvDTE.Project.get_Kind() at p.Program.Projects(DTE2 dte) in C:\z\p\Program.cs:line 764 at .. at p.Program.Main(String[] args) in [...] read more
c#
visual-studio-2010
console-application
envdte
extensibility
1vote
1answer

Marshal.GetActiveObject("Excel.Application") give Error Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED))

I have C# application using Microsoft.Interop.Excel and Microsoft.Interop.Word. We have validation that either word or excel one should be open at a time. When on Excel instance open out side of application with Active Cell - in Writing mode then I call Marshal.GetActiveObject("Excel.Application") to crate instance of Excel but at [...] read more
c#-4.0
office-interop
excel-2010
excel-interop
1vote
2answers

Can sort the Excel tables in multi-thread?

My codes as follow: Parallel.ForEach(listSheets, (xlWorkSheet1) => { // Excel.Worksheet xlWorkSheet1 = (Excel.Worksheet)excelbk.Worksheets["Sheet1"]; xlRange = (Excel.Range)xlWorkSheet1.Cells[xlWorkSheet1.Rows.Count, 1]; lock (xlRange) { // nRows = (long)xlRange.get_End(Excel.XlDirection.xlUp).Row; nRows = xlWorkSheet1.UsedRange.Cells.Rows.Count; xlRange = (Excel.Range)xlWorkSheet1.Rows["5:" + nRows, Type.Missing]; xlRange.Sort(xlRange.Columns[clnum1, Type.Missing], Excel.XlSortOrder.xlAscending, xlRange.Columns[clnum2, Type.Missing], Type.Missing, Excel.XlSortOrder.xlAscending, Type.Missing, Excel.XlSortOrder.xlAscending, Excel.XlYesNoGuess.xlNo, Type.Missing, Type.Missing, Excel.XlSortOrientation.xlSortColumns, Excel.XlSortMethod.xlStroke, Excel.XlSortDataOption.xlSortTextAsNumbers, Excel.XlSortDataOption.xlSortNormal, Excel.XlSortDataOption.xlSortNormal); [...] read more
c#
multithreading
excel
1vote
1answer

How can I progrommatically change the target framework from 4.0 to 3.5 of a project/solution?

Edit 3: After more googling it looks like you can't have the TargetFrameworkMoniker property in a .NET 3.5 application. So I guess I should be asking a different question. How do I change the Target framework from 4.0 to 3.5? Unfortunately, I can only find stuff on how to go [...] read more
c#
code-generation
0votes
0answers

c# Interop Word "Call was rejected by callee" only when dialogue is open

I have a simple c# application, (which helps entering Header/Footer.) So all works fine, but when any Dialogue (eg. Select Font) in Word ist opened, I can't connect the "ActiveDocument.Name" any more. private IopW.Application wordApp; private IopW.Document wordDoc; ... wordDoc = wordApp.Documents.Open(Datei); ... try { if (wordApp != null && [...] read more
c#
ms-word
interop
0votes
0answers

MSProject Interop RPC_E_CALL_REJECTED

I'm facing a problem when reading 2400 tasks from a MS Project file. My code is running succesfully but after some time I'm getting the next error: System.Runtime.InteropServices.COMException (0x80010001): Aanroep geweigerd door aangeroepene. (Uitzondering van HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)) bij Microsoft.Office.Interop.MSProject.Task.get_Name() bij _Default.MSPReadAll() in D:\Websites\WebSite1\MSP\Default.aspx.vb:regel 142 Sometimes it's after 140 tasks [...] read more
c#
.net
vb.net
interop
ms-project
0votes
0answers

How to fix RPC_E_CALL_REJECTED error when opening multiple MS Project files?

So im trying to open multiply MS Project files with data from database using MS Project interop. Start with code like this: application = new MSProject.Application(); application.FileOpenEx(copyPath); // copy file from template currentProject = application.ActiveProject; And then working with its tasks: MSProject.Task task = application.ActiveProject.Tasks.Add(item.Name); InitTask(item, task, false); // fill [...] read more
c#
ms-project
0votes
0answers

OperationStopped with copying excel worksheet to another excel file in Powershell

I have an automation Powershell script running for years. But in the running this month, it keeps reporting errors when tried to copy an Excel sheet to another Excel file $excel = new-object -comobject excel.application $excel.Visible = $True $excel.EnableEvents=$False $excel.DisplayAlerts=$False .... 48 #Copy Summary tab from each model to Golden [...] read more
excel
powershell
0votes
0answers

Problem: Raspberry Pi to NXP MPC5744p over SPI

I am currently trying to get SPI data transfer between the MPC5744p and a Raspberry Pi 4 to work. I'm using the SPIdev python toolkit to send the value 26 over to the MPC, using the following SPItest.py script. import spidev import time spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 7629 [...] read more
c
raspberry-pi
embedded
spi
powerpc
0votes
1answer

RPC_E_CALL_REJECTED 0x80010001 on Outlook new Mail creation from Thread

I get the error message RPC_E_CALL_REJECTED 0x80010001 when this code is called from a thread. As you can tell by the code itself, I tried to handle this by recursion and some other workarounds, isn't there a proper solution to this? Public Sub Run(ByVal f As List(Of String), ByVal Optional [...] read more
vb.net
multithreading
outlook
office-interop
0votes
1answer

Strange behaviour of "Call was rejected by callee." exception with Excel

I have an application that includes data exporting to Excel. And it works fine on most computers. However, there're two that throw > Call was rejected by callee. (Exception from HRESULT: 0x80010001 > (RPC_E_CALL_REJECTED)) when I try to open Worksheet with get_item(). The funny thing is, when I set up [...] read more
c#
excel
excel-interop
0votes
0answers

How to fix a System.Runtime.InteropServices.COMException error

I have created a C# WinForms project which calculates numerical values and writes them to an open Excel spreadsheet. The program works by allowing the user to open a spreadsheet in the Excel program. The writing is carried out by one method called private void updateExcel_Click(object sender, EventArgs e) which [...] read more
c#
excel
excel-interop
0votes
1answer

Export to Excel Call Rejected

I have a button on my winform where I export the contents from a data gridview to excel it works fine on my local machinebut when I copied the .exe over to the client machine and let him run the excel functionality is not working. this is the code for [...] read more
c#
winforms
datagridview
export-to-excel
0votes
1answer

Automate exporting of Excel worksheets to PDF

Editor's note: The OP has abandoned this question and asked a variation at https://stackoverflow.com/questions/38766898/saving-excel-worksheets-to-pdf-using-powershell. I have been trying to implement the following PowerShell script but without any luck. Can someone please help? I know this script will save 1 PDF file per Excel workbook, however once I get this working [...] read more
excel
powershell
0votes
0answers

Multiple Large Documents

I have 41 large Word documents (Titles) that I am trying to create using InterOp. There are about 700 chapters in total. Each of the 41 gets some of the chapters. There are a total of about 31,000 paragraphs that are spread out among the chapters. In Visual Basic .Net [...] read more
.net
vb.net
ms-word
office-interop
0votes
1answer

Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed

I have created windows service in .Net 4.5.Service is written to open outlook client, read emails from Inbox folder, downloads attachments.The code written is correct, since I have run & tested it in console application project. But when I install the web service using "installutil" and run it, the service [...] read more
.net
windows
c#-4.0
service
outlook-2010
0votes
1answer

Open outlook new mail window from server c#

I having a frunctionality in which user can select multiple product links and can choose an option to mail those links to anyone as a new outlook mail window will be opened. Everything is working fine on my local machine but on deployed link this functionality is not working and [...] read more
javascript
c#
email
outlook
0votes
0answers

MS Project handling with php

I've created a small C# console program that handles and exports some stuff from MSProject. After I have installed Microsoft Server 2008, and tested my program from console. Then as a final step I've installed apache&php, but I couldn't force my program to work by php calls. I think it [...] read more
c#
php
file-permissions
ms-project
0votes
1answer

OLE Automation Word 2013 fails when a second instance of word is running

I sometimes get 'Call rejected by callee' Exception from HResult 0x80010001, when calling Microsoft.Office.Interop.Word._Document.get_Fullname(). I noticed this is happening when 'outlook preview attachments' is enabled and someone is previewing a Word document inside outlook. Apparently when one previews a Word document, a second instance of WinWord.exe is created. Next OLE [...] read more
office-interop
0votes
1answer

Unable to send powershell email using php script to outlook using iis windows server 2012

Error -: > New-Object : Retrieving the COM class factory for component with CLSID > {0006F03A-0000-0000-C000-000000000046} failed due to the following error: > 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 > (RPC_E_CALL_REJECTED)). At D:\get-process.ps1:5 char:12 + $Outlook = > New-Object -ComObject Outlook.Application + > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo [...] read more
php
powershell
iis
outlook
windows-server-2012
0votes
1answer

Preview of Power Point in Sharepoint 2013

I am developing a web part using share point 2013 and Visual Studio 2013.I have to display the preview of a power point file(also excel and word files).Preview is working fine for .pdf files.So my idea is to convert ppt file to pdf file and then display the preview.Please see [...] read more
sharepoint
com
0votes
1answer

Avoiding VSTO, Word Automation Timing RPC_E_CALL_REJECTED Errors

I am writing a VSTO VB.NET application that controls a Word document, using standard features such as copying, pasting, inserting text, and pages, for example, and no additional threads. I get the following error at different times: Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)). This appears to [...] read more
vb.net
vba
vsto
0votes
0answers

AxDSOFramer exception in the Open method

I'm newbie in the use of AxDSOFramer . I have this simple code Try strAnnexeFile = "C:\test\Annexe.xlsx" AxFramerControl2.Open(strAnnexeFile, False, Type.Missing, Type.Missing, Type.Missing) Catch ex As Exception MessageBox.Show(ex.ToString) AxFramerControl2.Close() End Try but I got this exception : > System.Runtime.InteropServices.COMException (0x80010001): L’appel a été rejeté > par l’appelé. at DSOFramer._FramerControl.Open(Object Document, Object [...] read more
c#
vb.net
winforms
excel-interop
dsoframer
0votes
1answer

Creating VS 2010 IDE instance throwing COM Exception

I have created a console app, which creates hidden instance of VS 2010 IDE & passes this instance as a parameter to an add-in which I use to call within the console app. ~concept of creating hidden instance, got from below link: Open a VS 2005 Solution File (.sln) into [...] read more
c#
visual-studio-2010
envdte
0votes
1answer

How do I Add multiple projects to a solution using PowerShell? (I must be doing something fundamentall wrong here)

I am learning powershell while doing this (what I thought would have been) a small and simple assignment. I can't really figure out where I am going wrong so hoping someone would point me in the right direction. I am just trying to add a number of projects to a [...] read more
powershell
powershell-2.0
powershell-3.0
powershell-1.0
0votes
0answers

MS Word interop behavior

I am working on a Windows app that uses MS Word interop to generate reports. Environment is Windows 8.1 64-bit, Visual Studio 2013, Word 2013; the app is written in C#. I'm experiencing unpredictable behavior with Word; sometimes it declines to process basic commands (ie SaveAs) and returns the error [...] read more
c#
ms-word
office-interop
0votes
2answers

PowerShell Excel Report Script Weird Error

I am having a weird problem with powershell. I have other scripts similar to the one throwing an error on a line I am using several times throughout the script. I am using the get-content to grab a CSV file. Then I begin to parse through that data only selecting [...] read more
excel
powershell
0votes
2answers

How to iterate through each word, ms-word?

Ok, my main objective is to go through each word and check if word is underlined. If it is, I want to change the font size to an int x. I have tried simply going through each character like so Edit: Updated code private void button1_Click(object sender, EventArgs e) { [...] read more
c#
loops
ms-word
edit
0votes
0answers

Prevent interruptions in ms-word

I have a loop which is iterating through words in a word document, but the problem is that a popup shows up that prevents the loop from continuing. popup that messes up code [https://i.stack.imgur.com/OLaF4.png] ^^Is saying the office version is not activated. It will then give the following error COM [...] read more
c#
loops
ms-word
0votes
1answer

Testing Visual Studio 2008 Package

I'm developing a Visual Studio Integration Package. When I try to run the Unit Tests that are included in the unit test project that is included in the template I get the following failure on the first test: > The test adapter 'VsIdeHostAdapter' threw an exception while running test > [...] read more
visual-studio
unit-testing
vspackage
-1votes
1answer

IMessageFilter for BackgroundWorker [Excel]

I'm currently getting the following error when running the below code: Error: > COMException was unhandled > An unhandled exception of type 'System.Runtime.InteropServices.COMException' > occurred in mscorlib.dll > > Additional information: Call was rejected by callee. (Exception from HRESULT: > 0x80010001 (RPC_E_CALL_REJECTED)) Code: Sub DisplayInfo() txtSample1.Text = worksheet.Cells(((CurrentPage * 8) [...] read more
.net
-2votes
1answer

COM Exception - Call was rejected by callee and The runtime has encountered a fatal error

In my VB.NET application I have a class called Letter. In the constructor of the Letter class I initialize new word.application object. Sub New() _application = New Word.Application End Sub Recently I started to get a COM exception/error - Call was rejected by callee. After doing my research I have [...] read more
vb.net
com
ms-word

Comments

Leave a comment

(plain text only)

Sources

  1. winerror.h from Windows SDK 10.0.14393.0
  2. https://msdn.microsoft.com/en-us/library/cc231198.aspx

User contributions licensed under CC BY-SA 3.0