C# 设置word中table翻页不隔断
来源:互联网 发布:武汉人工智能公司 编辑:程序博客网 时间:2024/04/27 19:15
C#
public static object oMissing = System.Reflection.Missing.Value;
//设置word中table的属性(设置表分页不隔断)
MsWord.Application wordApp = new MsWord.Application();
wordDoc = wordApp.Documents.Open(“word路径”,
ref oMissing, true,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, false, ref oMissing,
ref oMissing, ref oMissing, ref oMissing);
foreach (Table table in wordDoc.Tables) //便利word中的所有表
{
//Microsoft.Office.Core.MsoTriState.msoTrue
table.Rows.AllowBreakAcrossPages = -1; //为什么是-1:the integral equivalent of the Boolean True (in VSTO) is -1.
//只须设置此项即可。。-1和0表示true。暂未发现false用什么表示
table.Rows.HeadingFormat = -1;
//VB代码:table.Rows.AllowBreakAcrossPages = true
// table.Rows.HeadingFormat = true
}
- C# 设置word中table翻页不隔断
- C# word 下一页 翻页 页数
- C# Word中设置/更改文本方向
- table 翻页
- 解决设置table中td宽度不生效
- C#设置word颜色
- SSRS 页面翻页后设置table表头依旧可见
- word中设置页码
- C# 设置word不可编辑
- ASP.net C# Label 英文被隔断问题
- C#中如何设置DataGridView列标题不换行
- word中不能用鼠标
- word中不能用鼠标
- .NET2005中使用GridView实现不刷新页面翻页
- css中table居中设置
- lua中设置只读table
- C#中操作Word(3)—— 利用Range对象读取和设置Word中的文本
- word中设置字符格式
- Glide由浅入深
- OpenCV学习笔记:opencv_ml模块
- Codeforces Gym 101164 C. Castle (KMP)
- SpringBoot系列(2)---无配置文件配置基础2
- iOS WebView 加载本地资源(图片,文件等)
- C# 设置word中table翻页不隔断
- 将cout<<的信息重定向到指定文件中
- Codeforces Gym 101164 D. Reading Digits (模拟)
- 二分法插入排序
- 图解MVC,MVP与MVVM
- 使用HttpListener 实现简单的web服务器
- Android工程和类库之间的转换
- Files and Directories
- Linux IO多路复用之epoll机制