Questions tagged [office-interop]

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

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

3602 questions
1
vote
1 answer

page break before last row table Office Interop

I am creating word document in c# with Microsoft.Office.Interop.Word and i have a long table to add. I am adding the table like this: //Add paragraph Microsoft.Office.Interop.Word.Paragraph treesPara = document.Content.Paragraphs.Add( ref…
Jordan
  • 570
  • 1
  • 6
  • 24
1
vote
1 answer

Prevent termination of Word Application when user closes last document

I have a simple Win Forms application that consists of a Button control, an OpenFileDialog component and a Microsoft.Office.Interop.Word.Application object: using System; using System.Windows.Forms; namespace WordInterop { public partial class…
Dan Stevens
  • 6,392
  • 10
  • 49
  • 68
1
vote
1 answer

Problems accessing Outlook from c# Application

I'm writing a console application, which checks the contents of an outlook mailbox, in order to read the contents of specific emails into a database. This application works fine within Visual studio, whether or not Outlook is open. If I build the…
fourdam
  • 116
  • 1
  • 12
1
vote
2 answers

How to change the format of excel cells using C#

IHi I am trying to read flat file n to excel. I am able to generate excel file using datatable but date fields are displaying like #####. I am trying to change the format of cells but unable to that . I have added the code for reference. kindly…
user2897967
  • 337
  • 2
  • 8
  • 24
1
vote
1 answer

Accessing Contacts From .OST File Office 2010/2013

Let me preface by saying that I don't work with office COM object's and generally try to avoid it like the plague. I also know this question has been beat to death with regard to accessing .pst files, however after an hour of googling I've yet to…
bumble_bee_tuna
  • 3,533
  • 7
  • 43
  • 83
1
vote
2 answers

How to identify a presentation in PowerPoint?

Normally, to identify a shape in a slide, we use PowerPoint.Shape.Id to identify a slide in a presentation, we use PowerPoint.Slide.SlideId but I don't know how to identify a presentation in a PowerPoint application. Assume that we have a collection…
chipbk10
  • 5,783
  • 12
  • 49
  • 85
1
vote
1 answer

How to detect if a doc document password protected

I have a folder with lots of doc-documents and I need to upload their context into database. The problem is that some of them are password protected and I don't know the password. I would like to skip them but I don't know how to detect if password…
StuffHappens
  • 6,457
  • 13
  • 70
  • 95
1
vote
1 answer

ssis microsoft.ace.oledb.12.0 error in Visual Studio 2008

This is my code to read columns from excel sheet and save into the data table which is working fine in my Visual Studio 2010 Console Application but when i am using this code in my SSIS project using Visual Studio 2008 and i have used the exact code…
Coder
  • 169
  • 7
  • 17
1
vote
1 answer

Slow performance when utilizing Interop.DSOFile to search files by Custom Document Property

I am new to the world of VB.NET and have been tasked to put together a little program to search a directory of about 2000 Excel spreadsheets and put together a list to display based on the value of a Custom Document Property within that spreadsheet…
Gradatc
  • 125
  • 1
  • 1
  • 12
1
vote
2 answers

Exclude office.interop if MS office not installed

My problem is my program crashes at run when it is opened by a computer that does not have office installed. I am writing a program where that will be run by multiple users on different computers. Some users computers will have MS office…
Matt
  • 358
  • 3
  • 9
  • 23
1
vote
1 answer

how to multiple select programmatically in PowerPoint

I want to programmatically select 2 shapes A and B from a set of shapes in a specific slide in PowerPoint, and then perform the "Cut" action. How can I do that? Note: I am using C#, Visual Studio 2013, PowerPoint 2013
chipbk10
  • 5,783
  • 12
  • 49
  • 85
1
vote
3 answers

Sometimes the spreadsheet has the left side columns cut off, and you can't scroll to them

I'm using Excel COM Interop to automate creating spreadsheets, and sometimes the left side (columns A-H) of the spreadsheet is not visible and I can't scroll to the left. Columns B-E are intentionally hidden and there's a freeze pane at P4. This…
user1538717
1
vote
1 answer

How to get the filename of a running PPS using System.Runtime.InteropServices.Marshal

I'm trying to make a .net 4.0 program which will get the filename of a PowerPoint Show (PPS) that is being viewed on the same machine. The purpose is to time how long a particular presentation takes to go through without any user action. I've…
Alex
  • 689
  • 1
  • 8
  • 22
1
vote
1 answer

Can't call Close on Word document without getting a warning

I can't call Close my opened word document: docs.Close(WdSaveOptions.wdDoNotSaveChanges, nullobject, nullobject); or Quit on the application: wordObject.Quit(WdSaveOptions.wdDoNotSaveChanges); Without getting this compiler warning: Warning 1 …
LSG
  • 61
  • 7
1
vote
1 answer

Undo action when deleting shapes in PowerPoint

I have 2 shapes: A and B in a PowerPoint.Slide. I used this tutorial to catch shape events including removing or creating shapes. When I got notified about deleting shape A, I will delete shape B at the same time. PowerPoint will understand deleting…
chipbk10
  • 5,783
  • 12
  • 49
  • 85