Why do I get a COMException when I try to initialize an Interop.Word.Application?

Why do I get a COMException when I try to initialize an Interop.Word.Application?

Content Index :

Why do I get a COMException when I try to initialize an Interop.Word.Application?
Tag : chash , By : user107506
Date : November 29 2020, 09:01 AM

I hope this helps . The problem is the following (excerpt from the exception message):

No Comments Right Now !

Boards Message :
You Must Login Or Sign Up to Add Your Comments .

Share : facebook icon twitter icon

COMException (0x800A13E9) - Word interop services

Tag : chash , By : FarmerDave
Date : March 29 2020, 07:55 AM
This might help you Here's the solution I found:
Put a folder called Desktop on C:\Windows\SysWOW64\config\systemprofile (Yes I know. WTF?) Open Regedit, Go to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AppId and edit the two enteries that have a Guid ending with 46. Delete every key they have and add a new key called RunAs with the value of Interactive User

Word Automation using microsoft word interop for a web application without an Interactive User

Tag : chash , By : Ben Kohn
Date : March 29 2020, 07:55 AM
like below fixes the issue this solution applies when the Word Automation works when there is an interactive user. the steps hereunder are to change from interactive user to a specific user so there is not obligation to be connected to the server to allow the word automation to work.
I created a new User on the server set a password and give it Administrator privileges. Click Start, click Run, and then type DCOMCNFG. in Component Services->Computers->My Computer ->DCOM config ==> right click Microsoft Word 97-2003. select Properties. in Security tab go to Edit and Add the user you created. in Identity select "This user" put the user you created and password.

C# COMException reading property of MSWord Shape object Microsoft.Office.Interop.Word

Tag : chash , By : Alecsandru Soare
Date : March 29 2020, 07:55 AM
This might help you I am unsure why this worked, but I was able to resolve this issue by using the "Select" method of the shape. Once the shape is selected the majority of the properties that previously were throwing errors are populated. There are still approximately 20 properties that thow the error, but I am now able to access things like "AlternativeText","Name","Callout" which were previously throwing the error.
        Word.Application WordApp = new Word.Application();
        d = WordApp.Documents.Open(@strFilename, ReadOnly: true, Visible: false);
        int iReplacements = 0;
        int iReplacementNoLink = 0;
        foreach (Word.Shape s in d.Shapes)
                //if (s.Type == Microsoft.Office.Core.MsoShapeType.msoLinkedPicture)
                if (s.LinkFormat.SourceName.ToString().Contains(".eps") || s.LinkFormat.SourceName.ToString().Contains(".png"))
                if (s.AlternativeText != "" && s.AlternativeText != null)

            catch (Exception fff)

System.Runtime.InteropServices.COMException when I run this Interop code with word

Tag : chash , By : Fred Morrison
Date : March 29 2020, 07:55 AM

Office.Interop.Word.Document.Open throwing COMException

Tag : chash , By : T11M
Date : March 29 2020, 07:55 AM
Related Posts Related QUESTIONS :
  • How can I create Prototype Methods (like JavaScript) in C#.Net?
  • DataTable Loop Performance Comparison
  • CSV string handling
  • What is the best way to do unit testing for ASP.NET 2.0 web pages?
  • High availability
  • What to use for Messaging with C#
  • Accessing a Dictionary.Keys Key through a numeric index
  • ConfigurationManager.AppSettings Performance Concerns
  • What Are Some Good .NET Profilers?
  • Is this a good way to determine OS Architecture?
  • How to create a tree-view preferences dialog type of interface in C#?
  • Searching directories for tons of files?
  • Can I have a method returning IEnumerator<T> and use it in a foreach loop?
  • Why can't I have abstract static methods in C#?
  • Displaying ad content from Respose.WriteFile()/ Response.ContentType
  • Convert integers to written numbers
  • Absolute path back to web-relative path
  • How can we generate getters and setters in Visual Studio?
  • Bringing Window to the Front in C# using Win32 API
  • Possible to "spin off" several GUI threads? (Not halting the system at Application.Run)
  • Reading a C/C++ data structure in C# from a byte array
  • How should I translate from screen space coordinates to image space coordinates in a WinForms PictureBox?
  • Setting Objects to Null/Nothing after use in .NET
  • Converting ARBG to RGB with alpha blending
  • Is it better to create Model classes or stick with generic database utility class?
  • Passing enum type to Converter with integer value
  • Pool of objects with objects that are already on the scene in advance
  • StatusBar text fade-out when binding using Caliburn.Micro
  • Queryfilter on ApplicationUser in OnModelCreating in ApplicationDbContext creates StackOverflowException
  • How to get record form a different table based on a value from first table with linq expression?
  • Show data in Grid from returned model
  • Using Attributes to Override Data Model Conventions
  • Basic OOP console calculator, result Error
  • Compositon and Repository pattern
  • Multiple using statements with if condition
  • How do i increase a number by 1 in every line that contain the number 1
  • Add binding to elements that are created in codebehind
  • How to add a column in an existing AspNetUsers table
  • Order a list of elements with another list of doubles
  • How to setup a NuGet package to copy content files to output build directory?
  • In SignalR Core using ChannelWriter: Do I need to call TryComplete twice if there's an exception?
  • C# GetProcessesByName: issue with colon
  • c# wpf | create complex object with user-defined name to Serialize into JSON
  • How can I get a instance of a generic list with reflection?
  • WPF XAML - Design time and visibility of textbox
  • EF Core and MySql query is too slow
  • Getting Registered App Display Name from an App Id
  • How to get all variables from a string
  • Delete entity with all childs connected
  • Azure Build agent cant´t find class library referance
  • Initialize Nested Dictionaries in c#
  • .Net Core Binding
  • Generic event test method, preventing code duplication
  • How do I keep the ellipses in the center when the screen is resized
  • How to require a property using JsonSchema.NET?
  • C# XDocument Element/Elements returns null
  • Autofac keyed service with IEnumerable relationship type
  • Installing EntityFramework via NuGet manager
  • Always Check if there is Internet Connection Xamarin forms
  • WCF OneWay service slows down when aspNetCompatibilityEnabled is set to false
  • shadow
    Privacy Policy - Terms - Contact Us © scrbit.com