word报表开发,表格格式化问题
foreach (Table tableItem in WordDoc.Tables){
tableItem.AutoFitBehavior(WdAutoFitBehavior.wdAutoFitContent);
tableItem.AutoFitBehavior(WdAutoFitBehavior.wdAutoFitWindow);
}
为什么运行时把tableItem.AutoFitBehavior(WdAutoFitBehavior.wdAutoFitContent);优化掉没有执行就过去了,设断点单步执行可以。可直接运行就不行了。
--------------------编程问答-------------------- tableItem.AutoFitBehavior(WdAutoFitBehavior.wdAutoFitContent);
自动填充内容?? --------------------编程问答-------------------- 对,先填充 --------------------编程问答-------------------- 怎么插入图片到帖子里呢,
--------------------编程问答-------------------- Table table = WordDoc.Tables.Add(WordApp.Selection.Range, 3, 2, ref nothing, ref nothing);
table.AutoFitBehavior(WdAutoFitBehavior.wdAutoFitContent);
object autoFitBehavior = Word.WdAutoFitBehavior.wdAutoFitWindow;
doc.Content.Tables.Add(
WordApp.Selection.Range, totalCount + 1, totalField - keyCount_1, ref missing, ref autoFitBehavior);是否有效 --------------------编程问答-------------------- 没有效,不过还是谢谢你 --------------------编程问答-------------------- ....没做过,帮顶
补充:.NET技术 , C#