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

Setting word document table cell margin programmatically using c#

As we can change default table cells margin in MS WORD using this steps Click the table. On the Table menu, click Table Properties, and then click the Table tab. Click Options. Under Default cell margins, enter the new values you want. and exactly…
Null
  • 154
  • 1
  • 14
1
vote
1 answer

How to improve performance of opening Microsoft Word when automated from C#?

I have Microsoft Word template that I automated filling it's fields from my application, and when the user requests to print I open this template. But creating the Word application every time a user requests to print after filling fields is very…
Abdullah BaMusa
  • 1,069
  • 3
  • 10
  • 19
1
vote
2 answers

Accessing a table in an excel spreadsheet using C#

I'm writing a program (in C#, using Microsoft.Office.Interop.Excel) that reads in an Excel spreadsheet and applies filters, etc. to the data within. However, I'm struggling with a few issues, namely how to "get" a table object representing the table…
stamblerre
  • 263
  • 1
  • 4
  • 11
1
vote
0 answers

How to load an old word file .doc in c#

Working with Office 2010, I'm able to access to .docx file without problem, using DocumentFormat.OpenXml. But, for .doc, it fails (the files have old winword format). Microsoft.Office.Interop.Word.Application wordApp; wordApp = new…
1
vote
1 answer

c# Progressbar without backgroundworker

I am using COM-automation to write-out data to an already-open Word-document. As this operation takes quite sometime I'd like to show a progressbar to the user. It is not possible to do the data-writeout in a backgroundworker, because this will…
sebb3
  • 11
  • 2
1
vote
1 answer

How to open word file in background using vb.net?

I am working on creating multiple documents from source document. I am using: objWordApp.Documents.Open("D:\Template\Aptletter.doc") I modify the above document and save in another folder. While creating documents, word files are opening and…
DEV RAJ
  • 21
  • 6
1
vote
1 answer

Matlab Actxserver :How could I terminate process opened by actxserver in matlab

I want to open and close an Excel file in MATLAB. I have tried the code below, but it failed on closing process with actxserver h.WorkBooks.Item(wbkname).Close; here is my code for this issue, how can I terminate the excel file? .Quit .delete I…
JonghoKim
  • 1,965
  • 7
  • 21
  • 44
1
vote
1 answer

OleDb Exception, too many characters in string

So I have been using oledb to create an Access table and insert data into it but I recently hit a brick wall when the data I was trying to insert became longer than 255 characters in some fields. This is apparently not possible to do. I ran into…
Mikkel Bang
  • 574
  • 2
  • 13
  • 27
1
vote
0 answers

HTML string to docx

How can I convert an HTML string (not a file) to a .docx file using Microsoft Office Interop Word? I have found a number of sources that offer the conversion using an HTML file, but not a string. My goal is to avoid creating an HTML file…
Lukas
  • 2,885
  • 2
  • 29
  • 31
1
vote
1 answer

Drawing on VSTO WordDocument without saving shapes in the document

We are trying to create a VSTO Word 2013 Document Addin which overlays visual indicators on the document while the user is editing to make them aware of problems with the information they are typing. It seems this can be done by drawing shapes such…
JoeGeeky
  • 3,746
  • 6
  • 36
  • 53
1
vote
1 answer

MS Word Interop - access CentimetersToPoints method

I am trying to set the print margins in a Word Doc I am printing from my c# application but I am having trouble accessing the methods that I need to call (based on what they are in MS Word VBA) In VBA the code looks like…
Our Man in Bananas
  • 5,809
  • 21
  • 91
  • 148
1
vote
4 answers

How to get an existing range name from an Excel worksheet using c# Excel.Interop?

I am working with a very large worksheet that has many named ranges. I expect that the worksheet will be modified in the future, so I cannot interact with cells using their cell number. How can I get an existing name (or list of the existing names)…
user3685427
  • 211
  • 2
  • 8
1
vote
1 answer

How to get the Paragraph style from w:sdtContent in word XML

I need to get the style of a paragraph to which i have assigned tag value ( COntentControl ). Now i have added contentControl (ie) Tag value to the paragraph in word,I can able to get the text of that corresponding paragraph to which i have assigned…
Dah Sra
  • 4,107
  • 3
  • 30
  • 69
1
vote
1 answer

Change Access report RecordSource and then OutputTo PDF from C#

How would I change a Microsoft Access report's RecordSource property from a C# Windows Forms handler, using Office.Interop code? I need to silently save the report as a PDF, using AccessApp.DoCmd.OutputTo(...) without any Parameter prompts from…
Warwick
  • 925
  • 1
  • 10
  • 22
1
vote
1 answer

DCOM Configuration for Microsoft Office 2007 - unable to open the document template (.dotm)

I am using Microsoft Word Automation for generating documents. The application is working on one system, but not on other. The problem with another system is that I once corrupted its registry by mistake. But, I have uninstalled and re-installed…
teenup
  • 7,459
  • 13
  • 63
  • 122
1 2 3
99
100