Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a problem, and I want to know if a macro can solve it:

I'd like a macro that can go through a Microsoft Word document, find every occurrence of a text string, and then highlight the string and create a comment bubble (the kind you get using "track changes") that contains a second text string (e.g., "This seems wrong.").

Can macros insert comment bubbles in that sort of way?

share|improve this question
1  
Did you tried anything ? –  Lamb Feb 7 '13 at 5:01

1 Answer 1

up vote 1 down vote accepted

Just coded this (on Word 2010, though can't see anything that should prevent it working on older versions):

Sub CommentBubble()
'
' CommentBubble Macro
'
'
Dim range As range
Set range = ActiveDocument.Content

Do While range.Find.Execute("aaa") = True
    ActiveDocument.Comments.Add range, "my comment"
Loop
End Sub

Which works, although obviously needs tidying up a bit :) You could create an Comment object (and specify things like Author, Initals...can't choose the colours though!)

share|improve this answer
1  
Thank you! That works perfectly! –  amitrus Feb 7 '13 at 14:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.