【问题标题】:VBA macro word commentVBA宏字注释
【发布时间】:2015-02-26 07:47:59
【问题描述】:

我是 VBA 宏的新手。我需要更改一个令人兴奋的宏,该宏对 word 中的注释进行操作。我需要将注释引用添加到字符串。所谓的注释引用是方括号内的字符串,这里是SM4:

图片链接http://dl.dropbox.com/u/13765664/wordcomment.png

我如何获得评论参考?

【问题讨论】:

    标签: vba ms-word


    【解决方案1】:

    我对 Word 编码一无所知,但这似乎可以满足您的要求:

    Dim ocom As Comment
    For Each ocom In ActiveDocument.Comments
        With ocom
            MsgBox .Author & vbCrLf & .Initial
            MsgBox .Range.Text
        End With
    Next
    

    【讨论】:

    • 这仅显示姓名(作者)和首字母缩写,不显示参考。
    • 我认为你所追求的是 .Inital & .Index 那么。
    猜你喜欢
    • 1970-01-01
    • 2020-08-29
    • 2011-09-05
    • 2011-04-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多