Document.DefaultTableStyle问题 [英] Document.DefaultTableStyle problem

查看:77
本文介绍了Document.DefaultTableStyle问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


您好:)



问题:


如何获取文档的默认表格样式来自VSTO插件?  或其名称,至少?



警告:


-   Globals.ThisAddIn.Application.ActiveDocument.DefaultTableStyle不起作用。


-   Globals.ThisAddIn.Application.ActiveDocument.WordOpenXML没有提供答案。



长篇故事:



当我创建模板并指定我的自定义样式(比方说,"MyStyle")时,默认的表样式,我可以看到它工作正常:


- 使用该样式创建新表


- 如果我解压缩模板文件并浏览到〜\ word\settings.xml,它就在那里,简单地表示日期:


< w:settings(...)>

解决方案


欢迎使用Office 2013和Office 365 ProPlus IT专业人员讨论论坛。此论坛适用于与Microsoft Office相关的非编程问题。由于您的问题与VSTO更相关,我会将其移至更合适的论坛:


https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsto


<跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> <跨度> 我们建议适当发布的原因是您将获得最合格的受访者群体,以及定期阅读论坛的其他合作伙伴
可以分享他们的知识或从您与我们的互动中学习。感谢您的理解。


问候,


Steve Fan


Hello :)

Question:

How can I get the default table style for the document from a VSTO addin? Or its name, at least?

Caveats:

- Globals.ThisAddIn.Application.ActiveDocument.DefaultTableStyle doesn't work.

- Globals.ThisAddIn.Application.ActiveDocument.WordOpenXML doesn't provide the answer.

Long Story:

When I create a template and assign my custom style (let's say, "MyStyle") to be the default table style, I can see that it works fine:

- new tables get created with that style

- if I unzip the template file and browse to ~\word\settings.xml , it's right there, plain as day:

<w:settings (...)>

解决方案

Hi,

Welcome to the Office 2013 and Office 365 ProPlus IT Pro General Discussions forum. This forum is for non-programming questions related to Microsoft Office. Since your question is more related to VSTO, I'll move it to a more appropriate forum:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vsto

The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

Regards,

Steve Fan


这篇关于Document.DefaultTableStyle问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆