Consulting

Results 1 to 3 of 3

Thread: Inserting comment bubbles?

  1. #1
    VBAX Newbie
    Joined
    Feb 2013
    Posts
    4
    Location

    Inserting comment bubbles?

    Hi all,

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

    I'd like a macro that can go through an MSWord 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?

    Thanks for your help!

    Amitrus

    PS: I'm a bit new to this, so forgive me if any of my questions seem silly.

  2. #2
    VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,273
    Location
    Cross-posted at: http://www.msofficeforums.com/word-v...es-msword.html
    For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    VBAX Newbie
    Joined
    Feb 2013
    Posts
    4
    Location
    Apologies for the cross-posting.

    I managed to get a solution to the problem. The following works:

    [VBA]
    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[/VBA]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •