簡體   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