Questions tagged [novacode-docx]

DocX is a .NET library that allows developers to manipulate Word 2007/2010/2013 files.

DocX is a .NET library that allows developers to manipulate Word 2007/2010/2013 files, in an easy and intuitive manor.

DocX is fast, lightweight and best of all it does not require Microsoft Word or Office to be installed. All that you need to install in order to use DocX is the .NET framework 4.0 and Visual Studio 2010, both of which are free.

106 questions
0
votes
1 answer

NovaCode DocX can't replace the correct items in my word template

I have created a generic function to generate doc files using the DocX library but it doesn't work with all items in my doc template. It replaces just the first items and make the same txt in others ones. My doc parameters is set like this:…
ahmed
  • 7
  • 5
0
votes
1 answer

Novacode docx - add style to table

I am using Novacode Docx to build a document based on webpage responses and need to know how \ where to apply a style to my table. Happy to take answers in both VB and C# this is what I have so far to build up the table and output it to the…
Simon Price
  • 3,011
  • 3
  • 34
  • 98
0
votes
1 answer

How to make table cell page brake in Novacode?

I need to make one big table and the cell does not start at a new page, so one cell will be on 2 pages which I do not want, how can I prevent this? I found this http://shaunakelly.com/word/styles/page-breaks-in-tables.html But it does not seem to…
dontberude
  • 511
  • 1
  • 4
  • 10
0
votes
1 answer

How to retrieve all equations in word document using DocX library

I am using the DocX library to post-process my documents. Is there a way to get a list of all equations in the document? I have seen that you can easily insert an equation using DocX.InsertEquation(), however I can't find a way to retrieve a list…
BigONotation
  • 4,406
  • 5
  • 43
  • 72
0
votes
1 answer

DocX looping table for unknown amount of rows

I have recently installed DocX for asp.net and have encountered an issue for create a loop for an unknown amount of rows. I am creating a report for users coming from a SQL server. A section of this is to do with history, in the database for each…
bert_148
  • 7
  • 7
0
votes
2 answers

Where will using Interop fail? Don't use Office.Interop if Office is not installed. late binding?

My windows forms application uses Novacode DocX to write a document from a template. The Novacode portion of the project works perfect and the file saves. The issue is that when I load the document the field/s (Table Of Contents) are not updated…
0
votes
4 answers

Remove cells from word table with Novacode DocX

How do I remove a single cell from a word table using Novacode DocX? I have tried: table.Rows[0].Cells.RemoveAt(2); and Cell c = table.Rows[0].Cells[2]; table.Rows[0].Cells.Remove(c); and table.Rows[0].Cells.RemoveRange(2,4); None of them remove…
yammerade
  • 629
  • 8
  • 20
0
votes
1 answer

How to change background color with DocX (Microsoft Word) documents

I am trying to change the background color (only for a few words) in a Word document. I am using DocX (https://docx.codeplex.com/SourceControl/latest#Examples/Program.cs), but I cannot find any methods/properties which allow me to do so. Here is my…
Franva
  • 6,565
  • 23
  • 79
  • 144
0
votes
2 answers

c# Find and Replace Text in a Word Document

i want to Create and Manipulate Word Documents Programmatically Using DocX ! and create a word template InvoiceTemplate.docx this is my code : protected void CreateDoc_Click(object sender, EventArgs e) { //Createa docx File DocX gDocument; …
0
votes
1 answer

DocX - Insert Table at Specified Index

I have developed a WinForms application which utilises the DocX Library for editing .docx files in memory. I have one issue which i have searched Google vigorously, this is I would like to add a Table to my document using a specific index. I do this…
user2345709
  • 11
  • 1
  • 4
0
votes
1 answer

How can I remove all extraneous spaces from a *.docx file?

I want to remove all superfluous spaces from a .docx file. If there are cases where there are more than two, to accomplish this manually I need to do a search-and-replace for two spaces multiple times to get all of them, and it's hard to tell when…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
0
votes
2 answers

Richtextbox and Docx converting

I'm making an editor for Word documents in C#. And I'm using a RichTextBox to create text with its formatting, and add a slice of XDocumento docx. Someone could tell me if you have any way of converting?? include formating... This example would…
-1
votes
1 answer

How to set drop down list control in Word document using c#?

I am having issues with setting a drop down list control in ms word document using Novacode-Docx. e.g. Gender from drop down list. I have got some text replacement but that's easy. I have done that. Just the drop down list I am struggling with. If…
user3202862
  • 207
  • 4
  • 19
-1
votes
2 answers

How to lock track changes (with a password) in word 2013 using C#?

I know there are several docx creation/modification approaches in C# OpenXML, DocX API, etc. I've figured out how to enable tracked changes using Open XML, just haven't figured out to lock the tracked changes (a feature in word 2013).
Pinch
  • 4,009
  • 8
  • 40
  • 60
-1
votes
3 answers

Why is this simple text replacement code not working?

With text like this in a *.docx file: I scream. You scream. We all scream for ice cream. I scream.You scream.We all scream for ice cream. ...(IOW, two spaces between sentences in the first case, and no spaces in the second case) I want to…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862