Initial Property

Microsoft Word Visual Basic

expression.Initial

expression    Required. An expression that returns a Comment object.

Example

This example displays the initials of the user who made the first comment in the selection.

If Selection.Comments.Count >= 1 Then
    MsgBox "Comment made by " & Selection.Comments(1).Initial
End If
		

This example checks the author initials associated with each comment in the first document section. If the author initials are "MSOffice," the example changes them to "KAE."

Dim rngTemp As Range
Dim comLoop As Comment

Set rngTemp = ActiveDocument.Sections(1).Range
For Each comLoop In rngTemp.Comments
    If comLoop.Initial = "MSOffice" Then comLoop.Initial = "KAE"
Next comLoop