This project has moved and is read-only. For the latest updates, please go here.

Text Replacement. How Can It Be?

Aug 13, 2012 at 1:42 PM
Edited Aug 13, 2012 at 1:44 PM

Good day!

I'm using Docx.dll and I'm very happy about this product. I found 2 interesting moments. Maybe  there are bugs, or maybe not.

1) Text Replacenet with code (DocX v1.0.0.12):


document.ReplaceText("pear",banana", true, RegexOptions.IgnoreCase);


If I use Microsoft Visual Studio 2008 Express, I can't use this overloaded method.
It says that overloaded method ReplaceText has some invalid arguments. I can it use
just with 5 parameters... It is more strange, when I works correctly with Microsoft
Visual Studio 2010 Express. It says, that method document.ReplaceText can work
with 3 parameters.

The same sutiation, I can't use DocX v1.0.0.11 with Microsoft Visual Studio 2008 Express. It says, that namespase Novacode does not exist... Strange.
 2) Maybe it is bug. When I use, for example,


Table.Rows[0].MergeCells[0, 3]; 


I get merged table row, but inside I have 3 paragraphs except 1 (table row has height more than it would be).


Nov 8, 2012 at 11:19 AM

You need to add the reference to the novacode.dll within your project in VS2008 (as you did in 2010). Then you can call on the namespace and should find it all working.