简体   繁体   English

词自动动态书签

[英]Word automation dynamic bookmarks

I have this problem where I have a number of tables, Undefined number of tables 我有一个问题,我有许多表, 未定义的表数
and I'm constructing a word document using c#, I need to add each table right after the previous one ended, I tried dynamically adding a bookmark at the end of the loop and then add the needed table but the format was not correct, the things overlapped and things at the beginning of page became last, I'm lost here can you help me?? 我正在使用c#构建一个word文档,我需要在上一个表结束后立即添加每个表,我尝试在循环的末尾动态添加书签,然后添加所需的表,但是格式不正确,事情重叠了,页面开始处的事情变成了最后,我迷路了,你能帮我吗?

I did this before by adding a table in the document and then insert a new table in each row of parent table, but this make some properties not apply to the child table 我通过在文档中添加表格然后在父表格的每一行中插入新表格来完成此操作,但这会使某些属性不适用于子表格

Try using content controls and here is an excellent article on MSDN 尝试使用内容控件,这是MSDN上的精彩文章

http://msdn.microsoft.com/en-us/library/cc197932(office.12).aspx http://msdn.microsoft.com/zh-cn/library/cc197932(office.12).aspx

Many applications use Word automation that needs the clients to have MS Office installed but there are some companies that are likely run by MS employees/coders who understand well about window's word documents [its internal structures] and thus they do not rely on MS OFFICE but still are able to create applications like yours, their applications should be of better worth. 许多应用程序使用需要客户端安装MS Office的Word自动化,但是有些公司可能由MS员工/编码员运营,他们对窗口的word文档[其内部结构]了如指掌,因此他们不依赖MS OFFICE,但是仍然能够创建像您一样的应用程序,它们的应用程序应该更有价值。 Give it up! 放弃!

对于该特定问题,我为要插入的每个表使用了新段落

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM