自定义 XML 绑定导致 Word 文档丢失内容控制样式/字体

发布于 2024-09-28 22:42:19 字数 243 浏览 0 评论 0原文

我正在尝试创建一个 Word 文档,该文档具有与 XML 文档的内容控制绑定,我将其替换为 word docx 包中的 custom.xml。

当我创建原始文档时,我向内容控制文本添加了字体、大小和样式。这使得它适合我的其余文档风格。

然后,当我交换自定义 XML 内容并重新打开文档时,所有样式内容都消失了,并且显示为 Calibri 字体大小 10 - 与我指定的 arial 大小 18 粗体完全不同。

这是怎么回事?

I am trying to do a word document that has content control bindings to an XML document that I am swapping out for custom.xml in the word docx package.

When I created my original document, I added fonts and size and style to the content control text. This made it fit the rest of my documents style.

Then when I swap in the custom XML content, and re-open the document, all of the style stuff is gone and it is showing up as a Calibri font size 10 - nothing like the arial size 18 bold I specified.

What is going on here?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

舟遥客 2024-10-05 22:42:19

这是 Word 2010 还是 2007。我似乎记得 XML 内容控件由于与 Microsoft 的诉讼而被删除,因此这可能不是一个好的前进策略。

Is this Word 2010 or 2007. I seem to recall XML content controls being removed as a result of a lawsuit with Microsoft, so that might not be a good strategy moving forward.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文