How can I create a header in a table for each new page with Word interop?  

  RSS

Dharmendra singh
(@dharmendra-singh)
New Member Registered
Joined: 12 months ago
Posts: 1
21/12/2018 12:15 pm  
 

I am trying to create a table with a header. I want this header to be repeated for each new page that the table takes. How can I do this in C# with Word 2007 Interop?


ReplyQuote
Lokesh Garg
(@lokesh-garg)
New Member Registered
Joined: 12 months ago
Posts: 1
21/12/2018 12:18 pm  
Microsoft.Office.Interop.Word.Table table;
/* ... */
table.Rows[1].HeadingFormat = -1;

ReplyQuote
John murrey
(@john-murrey)
New Member Registered
Joined: 12 months ago
Posts: 2
21/12/2018 12:22 pm  

foreach (Table item in doc.Tables) { item.Rows[1].HeadingFormat = -1; item.ApplyStyleHeadingRows = true; }

and setting a style on each table with the property set to create a header on each new

t.set_Style(TableStyle);

This post was modified 6 months ago by John murrey

ReplyQuote
Share:
  
Working

Please Login or Register