Context: I am using Word 2019 (Office 365 subscription, if that matters). I have added a series of buttons to my Review ribbon, each set to create a specific comment on some text. (Writing teacher. I make a lot of repeated comments.)
The structure for each comment macro is as follows:
Sub AddSomeComment()
Dim someComment As String
someComment = "Long explanation of some revision recommendation."
ActiveDocument.Comments.Add Range:=Selection.Range, Text:=someComment
End Sub
Problem: The comment balloon is always added, but it is frequently left blank. On some documents, every comment will work (1/10 maybe). On others, the first comment will work but all others will be left blank. A majority of documents will not place the text into the comment. All documents are saved as docx prior to commenting.
I have tried debugging and rewriting the code several times. I've hard coded strings in to each comment and gotten the same results. I have tried using a MsgBox() to verify that someComment has a string in it (it does).