使用word文档中的vba重命名格式化作者名称

问题描述 投票:0回答:1

我需要更改注释中的作者名称和使用VB应用程序格式化。

我尝试使用此代码重命名注释,但它不会更改格式化文本。

Dim objComment As Comment

    'Change all author names in comments
    For Each objComment In ActiveDocument.Comments
        objComment.Author = "Editor"
        objComment.Initial = "ED"
    Next objComment

请检查屏幕截图

enter image description here

vba ms-word word-vba
1个回答
0
投票

那是因为屏幕截图中的元素不是评论。这是审核更改 - 修订跟踪已启用,至少对于格式设置。如果您对跟踪文档的更改不感兴趣,则应关闭修订跟踪并接受文档中的所有修订。

© www.soinside.com 2019 - 2024. All rights reserved.