繁体   English   中英

VBA宏字注释

[英]VBA macro word comment

我是VBA宏的新手。 我需要更改一个令人兴奋的宏,以词为基础进行评论。 我需要将注释引用添加到字符串。 所谓的注释引用是方括号内的字符串,此处为SM4:

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

我如何获得评论参考?

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

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM