When I try to access an Excel spreadsheet using the following code I get a "Library not registered' error when defining the workbook object wrkbuk using C# from Visual Studio 2012 with Office 2007 (ver 12) installed Microsoft.Office.Interop.Excel.Application excapp = new Microsoft.Office.Interop.Excel.Application(); string bookname = @"C:\Users\Public\Documents\RECRUITMENT & SELECTION\MOVEMENTS\MOVEMENTS\Miscellaneous Documents\VacanciesREAL.xls"; Workbook [...] read more
I'm trying to make a program that would open new Outlook 2007 message. I've referenced from COM tab Microsoft Outlook 12.0 ObjectLibrary. These items showed up in references in VS: Microsoft.Office.Core Microsoft.Office.Inerop.Outlook Now I try to invoke following code: var _outlookInstance = new Microsoft.Office.Interop.Outlook.Application(); var _message = (OutlookApp.MailItem)_outlookInstance.CreateItem(OutlookApp.OlItemType.olMailItem); where OutlookApp==Microsoft.Office.Interop.Outlook [...] read more
I have seen many solutions for automating my InstallShield build, but I am having issues with each one. I am using InstallShield Professional 2013. Sorry for the lengthy question, but I am clueless on which direction to go to solve my issues. 1) IsCmdBld.exe - I have a script that [...] read more
> Unable to cast COM object of type > 'Microsoft.Office.Interop.PowerPoint.ApplicationClass' to interface type > 'Microsoft.Office.Interop.PowerPoint._Application'. This operation failed > because the QueryInterface call on the COM component for the interface with > IID '{91493442-5A91-11CF-8700-00AA0060263B}' failed due to the following > error: Library not registered. (Exception from HRESULT: 0x8002801D > (TYPE_E_LIBNOTREGISTERED)). [...] read more
I get an error when I add EF6 to a solution. I think it also happens when I update the model from the database. The error shows up in the Output window right after I add EF: "Could not parse the configuration file. The error message is: 'Library not registered. [...] read more
I had a C# program that did some Word & Excel automation and it used Office 2003 Primary Interop Assemblies. The way I deployed it was by including the Interops in the bin and I had my program reference it from there as opposed to referencing it from the GAC [...] read more
Am trying to add nuget package prism.core in vs 2017 and target framework is 4.6.1,its giving this error > Severity Code Description Project File Line Suppression State Error Failed to > add reference to 'Microsoft.Practices.ServiceLocation'. Library not > registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED) tried to install newtonsoft.json package, got [...] read more
Let me preface this by saying that I am unfamiliar with COM references, and I am using VS2010 on a Windows 7 64 bit machine. This morning I pulled down an existing project from TFS. I then tried to build the project and received this error: > The type or [...] read more
I have a project in visual studio 2013 that worked well. At the last rebuild (with no changes) it failed and I didn't got errors. I tried to restart everything and even build a new project with no luck. I reinstalled my VS2013 and nothing... :( when I changed the [...] read more
I installed RubberDuck and opened an Access 2007 Database I use as a code testing ground. When I click Refresh on the RD toolbar, the text continued to say Pending. After several click on the refresh button I open Settings and unchecked/Rechecked a random checkbox and clicked Ok. At that [...] read more
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using Excel = Microsoft.Office.Interop.Excel; namespace GridComplete { public partial class Form1 : Form { private static Excel.Workbook MyBook; private static Excel.Application MyApp; private static Excel.Worksheet MySheet; private void bRun_Click(object sender, [...] read more
I am developing Word shared add-in, using COM shim wizard. http://blogs.msdn.com/b/mshneer/archive/2010/03/19/com-shim-wizards-for-vs-2010.aspx Everything worked fine until I tried to use some threads. It fail on some machines with TYPE_E_LIBNOTREGISTERED exception for COM-object created in main thread. I have a Word document object (_doc) from some Word event and try to use [...] read more
After applying Microsoft .NET patches or upgrade and then subsequent downgrade of Microsoft Office, I am getting an error: Unable to cast COM object of type System.__ComObject to IRibbonUI. IID 00c03a7-0000-0000-c000-000000000046 Library not registered TYPE_E_LIBNOTREGISTERED 0x8002801d in an error window of Invantive Control when starting Microsoft Excel 2010. A similar [...] read more
I am trying to create a build using TFS and a build server. This is my first attempt with the build server and it is not going well!! I am using Visual Studio 2012 and TFS 2012. The project is written in VB.Net and uses a fair number of references. [...] read more
I am trying to integrate Visio 2007 with C# (VS 2012 and windows 7 OS) but I am getting error while running the code Unable to cast COM object of type 'Microsoft.Office.Interop.Visio.ApplicationClass' to interface type 'Microsoft.Office.Interop.Visio.IVApplication'. This operation failed because the QueryInterface call on the COM component for the interface [...] read more
I wrote a little program in Visual Studio 2010 to open an Access database, enter a value into a table, and open a form. Pretty simple, and the program works great on my laptop. The problem arises when I try and run the exe on a second PC. I cannot [...] read more
I got this error : > Warning 1 Cannot get the file path for type library > "a5ededf4-2bbc-45f3-822b-e60c278a1a79" version 12.0. Library not > registered. (Exception from HRESULT: 0x8002801D > (TYPE_E_LIBNOTREGISTERED)) OCRMongo In vb.net I follow instruction from http://www.techrepublic.com/forum/questions/101-345154/how-do-i-install-microsoft-modi-110 and I still get that warning. What's the problem? read more
Dears, in SSIS 2008 when I try to create new package I get following error : Error creating package Failed to save package file "C:\Users\Mehdi\AppData\Local\Temp\tmpA99D.tmp" with error 0x8002801D "Library not registered. I registered both MSXML4.dll and MSXML6.dll but I still have problem. read more
I am using GitHub for Azure. Suddenly, Azure stopped deploying from GitHub. It was working fine before. Below is the error i am getting now. > Command: "D:\home\site\deployments\tools\deploy.cmd" Handling .NET Web > Application deployment. MSBuild auto-detection: using msbuild version '14.0' > from 'D:\Program Files (x86)\MSBuild\14.0\bin'. Restoring NuGet package > DotNetZip.1.10.1. [...] read more
I use an Ubuntu VM at home for Rails development and I've gotten a bit spoiled by Bash. When I copy multiline text from Bash, it seems like it's pretty good about knowing that text is single line or multiline when I copy it. In Powershell (hosted in Console2) on [...] read more
I have a PC with MS Office 2010 installed while the MS Outlook is installed from Office 2007. On this PC the below code: Microsoft.Office.Interop.Outlook.Application myOutlook = new Microsoft.Office.Interop.Outlook.Application(); string theName = myOutlook.Name; results into the below exception: > Unable to cast COM object of type > 'Microsoft.Office.Interop.Outlook.ApplicationClass' to interface [...] read more
I had created a C# function which saves DataGridView to Excel which works well on most of machines. However, some of machines are throwing following error: Microsoft.Office.Interop.Excel._Application. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{000208D5-0000-0000-C000-000000000046}’ failed due to the following error: [...] read more
I am using Visual studio 2012 & creating a VB.Net Windows Forms Application whereas i am trying use microsoft office web components to embed an excel sheet into the form. I have installed, Office web components 11. while selecting the Microsoft office spread sheet 11.0 Item it says following error [...] read more
I have a newly-bought laptop. I installed it with Visual Studio 2013, Office 2013, and Project 2013. However, when I run my app, I have an error message: > {"Unable to cast COM object of type > 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Excel._Application'. This operation failed because > the QueryInterface [...] read more
I'm building an application for adding digital signature to word file, for that i'm using below code. private void CreateNewPage() { object missing = System.Reflection.Missing.Value; object fileName = @"F:\Doc\test.docx"; object readOnly = false; object isVisible = true; //Start Word and open a document. Microsoft.Office.Interop.Word._Application oWord; Microsoft.Office.Interop.Word._Document oDoc; oWord = new [...] read more
I am using LabVIEW 2018 32 bit version. In our LabVIEW application, we use Excel Report Generation functions. It was developed with Office 365 installed. Now I want to use Office 2013 for the Report Generation instead of O365. The report generated fine with Office 365. I downgraded my system [...] read more
I'm trying to build a project with Visual Studio and I get the following two errors: C:\secrets\Microsoft.Common.CurrentVersion.targets(2545,5): warning MSB3284: Cannot get the file path for type library "00020813-0000-0000-c000-000000000046" version 1.9. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) C:\secrets\Microsoft.Common.CurrentVersion.targets(2545,5): warning MSB3283: Cannot find wrapper assembly for type library "VBIDE". Verify [...] read more
In C++ add-in for Outlook, I'm now getting "Library not registered" error. This add-in worked for ages on this machine but somehow things got broken now (although it still works fine on other machines). Is there any way to find out which particular library is missing (not registered) without reinstalling [...] read more
I have an ASP web form Project stored in VSTS, and I am trying to build it. Suddenly I got this error in the build section: 2017-04-18T22:01:20.3859517Z Build FAILED. 2017-04-18T22:01:20.3859517Z 2017-04-18T22:01:20.3869498Z "d:\a\1\s\WebTimeSheet.sln" (default target) (1) -> 2017-04-18T22:01:20.3869498Z "d:\a\1\s\WebTimeSheet\WebTimeSheet.csproj" (default target) (2) -> 2017-04-18T22:01:20.3869498Z (ResolveComReferences target) -> 2017-04-18T22:01:20.3869498Z C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2399,5): [...] read more
I'm trying to compile a existing C# project using visual Studio 2015. It compiles good, but runtime getting following error: > An unhandled exception of type 'System.InvalidCastException' occurred in > MemoryManager.exe > > Additional information: Unable to cast COM object of type > 'mscomctl.ToolbarClass' to interface type 'mscomctl.IToolbar'. This operation [...] read more
Good morning. I've searched over the web and Microsoft's documentantion and didn't see any matches for the same error. When I click New Project, on Visual Studio 2015, I receive the following error: Library is not registered. (Exception from HTRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) There are evidences that the error may be [...] read more
We built a .NET COM/Excel RTD Server (.NET Assembly) which has been in use for many years, on a variety of machines (i.e. we know it works, and our standard method for installing it works). We have a user who installed this RTD component on a different machine, and is [...] read more
I'm creating a Visual Studio Package (vsix) (shameless plug: pMixins ) and I want to build the vsix package using the TeamCity continuous integration server. TeamCity uses MSBuild in the background. I am comfortable installing the Visual Studio SDK on my build agent, but I do not want to install [...] read more
After downgrading from Excel 2013 to 2010 (i.e. removing 2013 and installing 2010) when I try to access the Excel OM from my add-in like this: if (this.Application.ActiveWorkbook == null) { return; } I get the following Exception: > Unable to cast COM object of type 'System.__ComObject' to interface type [...] read more
I have an C# winform app compiled for x86 platform, using excel 2003 COM interop libraries. The Visual studio project references the following interop files for office 2003) Microsoft.Office.Interop.Excel.dll (v 11.0.0, specific version = true) Microsoft.Vbe.Interop.dll (v 11.0.0, specific version = false) This application runs fine on most computers with [...] read more
I have a add-in that works in vs2008 and vs2010. It connects to the TFS 2010 and takes information (SourceControlBindings class) about file using its local path The code is very simple: var sc = app.DTE.SourceControl as SourceControl2; and later static SourceControlBindings GetBinding(SourceControl2 sc, string fileName) { return sc.GetBindings(fileName); } [...] read more
I am trying to open an excel file (.xlsx) using C# (VS2010 professional) code. I am getting an (untraceable, to me) exception when executing/single stepping the last 2 lines of the below code. Below mentioned is my code for opening an existing excel file. string tesfile = "C:\\Users\\AWaheed3\\Desktop\\1.xlsx"; Microsoft.Office.Interop.Excel.Application xlApp; [...] read more
I am working on a Console application where I am executing a SSIS package from c#. Below is my code for the execution private bool ExecutePackage(int _sid, int _pid, int _envid, string _connection, int _scheduleId) { bool isSuccess = false; try { var dtPackagePath = HandlerFunctions.GetPackageInformation(_sid, _pid, _envid); var DtsxPath [...] read more
Some of our clients downgraded from Office 2013 to Office 2010. After doing that if you call the Application property ComAddins you get the following exception: System.Runtime.InteropServices.COMException (0x8002801D): Library not registered. (Excepción de HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) at Microsoft.Office.Interop.Word.ApplicationClass.get_COMAddIns() at our own code We have tried to reinstall Office doing different [...] read more
Our situation is that we have built a MS Outlook 365 COM Add-In, and we are trying to publish it using Jenkins. We are able to build it successfully on commit using msbuild, but in trying to publish it we get the following error: warning MSB3284: Cannot get the file [...] read more
I am working on a requirement to read the word document and populate data into Datatable or excel sheet using C# code. I am using Visual Studio 2015 and Office 2016 in my machine. In my solution I have added the references Microsoft Word 16.0 Object Library to work with [...] read more
I am rewriting an old VB6 application in c# on a Win10Pro64bit computer. The VB6 app uses an OCX called IMAGinE. I am able to add the control to the ToolBox. When I do, it adds two references: AxIMAGINELib and IMAGINELib. The IMAGINELib references has the little yellow triangle signifying [...] read more
I have a C++ DLL which holds COM code. When trying to access the interface with VBA code, I am getting these error messages: atlTraceCOM - ERROR : Unable to load Typelibrary. (HRESULT = 0x8002801d) atlTraceCOM - Verify TypelibID and major version specified with atlTraceCOM - IDispatchImpl, CStockPropImpl, IProvideClassInfoImpl or [...] read more
When I call new Microsoft.Office.Interop.Word.Application() to initialize, an error occurred. The message is as follows: > Unable to cast COM object of type > 'Microsoft.Office.Interop.Word.ApplicationClass' to interface type > 'Microsoft.Office.Interop.Word._Application'. This operation failed because > the QueryInterface call on the COM component for the interface with IID > '{00020970-0000-0000-C000-000000000046}' failed [...] read more
I have a continuous build task in Azure DevOps which builds the solution whenever code is pushed to repository. So my code is building and running fine on my local machine, but when it tries to build in devOps, this error comes, "Process 'msbuild.exe' exited with code '1'". and build [...] read more
I have a List that holds some objects, which properties I want to write in a en Excel. The code works perfectly with Excel 2013. The issue comes when I try to run it in a computer that only has Excel 2007. I already looked in different links and discussions [...] read more
I want to be able to execute an Adobe Illustrator ExtendScript via Windows Powershell. I believe this should be possible due to this answer that describes using VB via COM. This is my Powershell script: $illustratorRef = New-Object -ComObject Illustrator.Application $conversionScript = New-Object -ComObject Scripting.FileSystemObject $scriptFile = $conversionScript.OpenTextFile("C:\ws\ArtConversion\alert-test.jsx") $fileContents = [...] read more
I have had code working in an C# .net 2013. that exports the DGV to excel. However it has stopped working as of this morning, its been about a month since I have opened the code. Now I am getting an error: > Additional information: unable to cast COM object [...] read more
We have a problem when scripting PowerDesigner on Windows Server 2012. We don't have problems on Windows 10 and Windows 7 (we tried it on several machines). We are starting PowerDesigner from PowerShell like this: $PowerDesigner = New-Object -com powerdesigner.application Add-Type -path “C:\Program Files (x86)\Sybase\PowerDesigner 16\Interop.PdCommon.dll” Add-Type -path “C:\Program Files [...] read more
Trying to open my stored procedure through new query window in SQL Server 2012 but I get an error: > Library not registered. (exception from hresult: 0x8002801d > (type_e_libnotregistered)) Error screenshot: screenshot of the error I tried to solve through below given solution on by Microsoft but still its not [...] read more
I've got the code for project written with a vb.net, .net Framework 2.0, Windows Form Application. I'm trying to get it working in Visual Studio 2015. When I open it up, I'm missing several references. I try to compile (Clean/Rebuild) it, and get multiple errors. I've looked up the files [...] read more
I am using visual studio 2013 with Team foundation Server add-in. Opening up a TFS task/bug item, there is a outlook icon button, which allow me to open up outlook new email with the TFS item title. my visual studio runs in administrator mode. I have two office versions installed [...] read more
I can't install Entity Framework via Nuget on Visual Studio 2013 Ultimate. I've tried: * reinstalling it * update it (vs2013) patch5 * .net frameworks fixer (FixDotNet2017.cab) * other nugets versions * EFTools6.1.3ForVS2013.msi * msxml6_SDK.msi * repairing w/ MSXML * dotNetFx45_Full_setup.exe I've wasted a whole week on this - but [...] read more
we have a add-in in Outlook (VSTO) installed in an environment which has Outlook 2013 and Skype 2013. It has been working successfully until we migrated Skype for Business to version 2016. Ever since, whenever we try to read anything from the "ContactItem" class (we actually only need a custom [...] read more
I work on an integration server and now I would like to build a C#.NET 4.5 solution which refers to a COM library. The COM object is NOT installed on the CI machine. I have a .tlb file at hand. I have already created the .dll using tlbimp.exe and included [...] read more
Hi I am new to excel addin. i had installed microsoft office 2010 and my addin used to work perfectly. To verify in 2013 i had installed 2013 and was running both version 2010 and 2013. Recently i installed 2013 and now if i open 2010 version my addin loads [...] read more
In my WPF application I am using Microsoft.Office.Interop.Excel to import data from excel file. I have been using this code for last couple of months and it has been working just fine for me. Today all of a sudden when I ran the utility I got the following error. > [...] read more
I use this code to access to our outlook DB and retrieve the logged in user: Outlook.Application oApp = null; if (System.Diagnostics.Process.GetProcessesByName("OUTLOOK").Count() > 0) { oApp = Marshal.GetActiveObject("Outlook.Application") as Outlook.Application; } else oApp = new Outlook.Application(); Outlook.NameSpace oNS = oApp.GetNamespace("mapi"); oNS.Logon("Default Outlook Profile", "", false, true); // using the default [...] read more
I am using Visual studio 2012 & creating a VB.Net Windows Forms Application whereas i am trying to embed an excel sheet data into the form. I have installed, Office web components 11. while dragging and dropping the Microsoft office spread sheet Item it says following error > Failed to [...] read more
From last couple of days I'm struggling with redistributable PIA 2010. Actually I have created one excel application locally, which uses 2007 PIA (I have also MS Office installed on my machine). This application was working fine, now I have installed the 2010 PIA and register it's Microsoft.Office.Interop.Excel dll then [...] read more
Trying to automatically generate a mail message via Outlook - Added a reference to Microsoft.Office.Interop.Outlook 14.0.0.0 It works on a Win 8/Office 2013 PC, but fails with the following exception on Win 7/Office 2010. Code: Application outlookApp = new Application(); MailItem message = (MailItem)outlookApp.CreateItem(OlItemType.olMailItem); message.Subject = "subject"; message.Display(message); message.HTMLBody = [...] read more
Code as below. How to avoid the TYPE_E_LIBNOTREGISTERED(hr=0x8002801D, Library not registered) error(DO NOT register the ActiveX to Windows) of disp->Invoke()? When register the ActiveX control, all is OK, but I want not register to WINDOWS. Thanks! #define WIN32_LEAN_AND_MEAN #include <tchar.h> #include <Windows.h> #include <assert.h> #include <stdio.h> #include <ole2.h> int APIENTRY [...] read more
I'm running a 32 bit ver of win7 in a vm. I am trying to reference 5 com dlls (VB6) in my .net project. These dlls (and their dependencies) are registered ok since I can use them natively as they form a part of another app and that app is [...] read more
I am looking to upgrade legacy VB6 COM+ components to VB.NET components. I have seemingly upgraded one already, called EventPackage, which has one class, IEventListener. Another, TradeOrders, Implements EventPackage.IEventListener. When attempting to build TradeOrders, I get the following Errors/Warnings; 1. Cannot load type library for reference "EventPackage". Library not registered. [...] read more
I have a C# 4.0 application that is referencing a type library from a C++ application. This is used for some secure COM interop, a question I originally had asked here. On my development machine this second application is installed so I can compile without any issues. If I attempt [...] read more
I can create an ActiveX in JS (html is opend by IE): var o = new ActiveXObject("MyProgId"); But I can't create its instance in .NET: var t = Type.GetTypeFromProgId("MyProgId"); returns null. When I try to add "reference to COM" in VS I get such error: "Could not add a reference [...] read more
I have a COM Outlook addin which implements a ribbon button in Outlook 2010. It's been working just fine for quite some time. Until someone tried to load the addin in the Korean version of Outlook. The ribbon buttons show up but do not do anything when clicked. In the [...] read more
I'm experiencing a bit weird problem with VSTO Outlook add-in I'm developing. It works fine on a bunch of machines but in one it throws an InvalidCastException and cannot find the reason why. I've checked that all prerequisites are installed on this machine (the installer doest it by itself but [...] read more
I'm trying to do a simple outlook integration with c# using Interop when getting the default folder I always get an error. I'm using Office 2013 64bit, I only have 9.5 on my RegEdit. I Followed this link Here's my sample code: Outlook.MAPIFolder Folder_Contacts; Outlook.Application outlookObj = application; Outlook.NameSpace nameSpace1 [...] read more
I am new to Azure. I have a ASP.Net solution that I deploy to Azure. Recently, I started getting the error "Azure error Process 'msbuild.exe' exited with code '1'" when I push my code to Azure and it builds. I have no errors when I build and run locally. Only [...] read more