Word 2010 中添加了新样式(标题 1 + 非粗体)

发布于 2024-12-09 04:50:54 字数 135 浏览 1 评论 0原文

在 Word 2010 中,新样式是自动创建的,我想禁止这种行为。 例如:格式化后样式为“标题1”的文本说ctrl+B删除粗体,Word创建一个名为“标题1+非粗体”的新样式

实际上我想在应用程序级别从VSTO切换这种行为。 有任何帮助吗?

In Word 2010 the new styles are created automatically, I would like to suppress this behaviour.
For eg: the text with style "Heading 1" after formatting say ctrl+B to remove the bold, the Word creates a new style called "Heading 1 + Not Bold"

Actually I want to switch oof this behaviour from VSTO at application level.
Any help would be appreciated?

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

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

发布评论

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

评论(4

花伊自在美 2024-12-16 04:50:54

实际上,Word 并不是创建新样式,而是显示(在样式窗格中)也具有直接格式设置(即应用样式后应用的格式设置)的样式。样式窗格底部的选项链接将显示以下对话框,其中包含样式显示选项:

样式窗格选项

要关闭通过 VBA 直接格式化的显示(可以根据您使用的语言对 VSTO 进行调整):

 'Turn off display of character direct formatting
 ActiveDocument.FormattingShowFont = False
 'Turn off display of paragraph direct formatting
 ActiveDocument.FormattingShowParagraph = False 

此外,还可以使用 FormattingShowFilter 属性控制显示哪些样式。例如,仅显示活动文档中使用的样式:

ActiveDocument.FormattingShowFilter = wdShowFilterStylesInUse 

希望这会有所帮助。

Actually, Word is not creating new styles but is displaying (within the Styles Pane) styles that also have direct formatting (which is formatting applied after the application of a style). The Options link on the bottom of the Styles Pane will display the below dialog box, which contains the style display choices:

Style Pane Options

To turn off the display of direct formatting via VBA (which can be adapted for VSTO depending on the language you are using):

 'Turn off display of character direct formatting
 ActiveDocument.FormattingShowFont = False
 'Turn off display of paragraph direct formatting
 ActiveDocument.FormattingShowParagraph = False 

Additionally, one can control which styles are displayed with the FormattingShowFilter property. For example, to only display the styles in use in the active document:

ActiveDocument.FormattingShowFilter = wdShowFilterStylesInUse 

Hope this helps.

会发光的星星闪亮亮i 2024-12-16 04:50:54

您还可以在“样式窗格选项”对话框中取消选中“段落级格式设置”。关闭字体和段落的“格式化显示”是我使用Word的唯一方法。否则,多个作者添加的直接格式会掩盖您真正想要的样式。

You might also uncheck "paragraph level formatting" in the Style Pane Options dialog box. Turning off both font and paragraph "formatting to show" is the only way I can use Word. Otherwise, the direct formatting added by multiple authors obscures the styles you really want.

似狗非友 2024-12-16 04:50:54

提供的答案会影响显示,但不会影响 Word 的根本行为。如果您想在应用程序级别抑制此行为,请将“应用程序”选项的“跟踪格式设置”设置为关闭(“工具”>“选项”>“高级”>“编辑选项”>“跟踪格式设置”。)。

The answers provided affect the display, but not the root behaviour of Word. If you want to suppress this behaviour at the application level set the Application option to Keep Track of Formatting to off (Tools > Option > Advanced > Editing Options > Keep track of formatting.).

皓月长歌 2024-12-16 04:50:54

文件/选项/校对/自动更正选项...(按钮)/键入时自动套用格式(选项卡)/取消选中根据格式定义样式

File / Options / Proofing / Auto Correct Options... (button) / AutoFormat As You Type (tab) / uncheck Define styles based on your formatting

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