Word document in C# Windows Forms

  • Thread starter Thread starter Ian
  • Start date Start date
I

Ian

I am using Microsoft.Office.Interop.Word to build a Word document in a
Windows Forms Application.

How can I set the AllowBreakAcrossPages property in C# for a particular row
in a Word table.

Here is the VB equivalent:

tableNew.Rows(3).AllowBreakAcrossPages = False

but I cannot get C# to take it.

Thanks
Ian
 
Ian,

You would do this:

// Do not allow breaks across pages.
tableNew.Rows[3].AllowBreakAcrossPages = false;

However, if the type of tableNew is of type Object, then this will not
work in C#. Rather, you would have to call the methods/properties through
reflection.

Hope this helps.
 
Back
Top