Top "Office-interop" questions

Office Interop is the layer using the COM Interop that allows .NET or C# to communicate with standard COM objects and libraries.

Detecting a password-protected document

Is there any way to know whether a doc/ppt/xls file is password-protected even before opening the file?

c# .net vsto office-interop
How to add text into Word Documents at a specific position?

How do I write to a specific position in a Word document, for example, line 5, character 50? I have searched for …

c# ms-word office-interop
Using Interop.Word, is there a way to do a replace (using Find.Execute) and keep the original text's justification?

I'm attempting to write find/replace code for Word documents using Word Automation through Interop.Word (11.0). My documents all have …

c# .net ms-word office-interop word-automation
how can I lock shapes in PowerPoint?

I'm working on a Add-in for PowerPoint 2010 (C#) and I want to prevent the end-user to move or edit all …

c# powerpoint office-interop powerpoint-2010
C# Outlook interop and OpenSharedItem for opening MSG files

Is there any tutorial or resource I can follow in order to use the OpenSharedItem outlook interop method. My goal …

c# interop outlook office-interop msg
"You are not allowed to edit this selection because it is protected." but only since Office 2013?

We've had these few lines of code running happily in our applications for several years (and in several versions of …

.net office-interop word-2013
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 …

c# powerpoint office-interop comexception
Sending email from the specified Outlook Account

I am using Outlook2013 which has a number of mailboxes from both exchange and pop servers.([email protected][default …

c# email outlook office-interop mailitem
Save XLS Using Interop Excel

The Current Setup: So, I can use the following code to save a file as an XLS: _myWorkbook.SaveAs("FileName.…

c# vb.net excel office-interop excel-interop
Add a row to an MS Word table using Office.Interop

I have a word template with a table that I am populating from a list of strings that I split …

c# ms-word office-interop