I'm trying to make a piece of code for adding a comment via a shortcut.
I found a macro, but when I run the macro it all seems ok (accurate background highlighting with gray) except that the comment is added only to the last word in the selected group.
Is it possible to have a comment not only for last word in a sentence but for entire selected group of words?
P.S. Is it also possible to take text from clipboard and paste it directly without having to paste it manually (making cursor flashing in commentary, then ctrl+V)? Instead of review this value from a code.
Thank you very much for any help.
Sub Gray()
'
' Gray
'
'
Options.DefaultHighlightColorIndex = wdGray25
Selection.Range.HighlightColorIndex = wdGray25
Selection.Collapse Direction:=wdCollapseEnd
ActiveDocument.Comments.Add _
Range:=Selection.Range, Text:=" review this"
End Sub