开发者

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

开发者 https://www.devze.com 2022-12-13 06:36 出处:网络
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?Microsoft.Office.

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?


Microsoft.Office.Interop.Word.Table table;
/* ... */
table.Rows[1].HeadingFormat = -1;


This is what word for me, Looping through each table at the end

            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);
0

精彩评论

暂无评论...
验证码 换一张
取 消