Author Property

Microsoft Word Visual Basic

ShowAuthor property as it applies to the Comment object.

Returns or sets the author name for a comment. Read/write String.

expression.Author

expression    Required. An expression that returns one of the above objects.

Remarks

Changing the author for one comment will change the author for all comments in a document.

ShowAuthor property as it applies to the Revision object.

Returns the name of the user who made the specified tracked change. Read-only String.

expression.Author

expression    Required. An expression that returns one of the above objects.

Example

ShowAs it applies to the Comment object.

This example sets the author name and initials for the first comment in the active document.

If ActiveDocument.Comments.Count >= 1 Then
    With ActiveDocument.Comments(1)
        .Author = "Joe Smith"
        .Initial = "JAS"
    End With
End If
				

This example returns the author name for the first comment in the selection.

Dim strAuthor as String

If Selection.Comments.Count >= 1 Then _
    strAuthor = Selection.Comments(1).Author
				

ShowAs it applies to the Revision object.

This example displays the author name for the first tracked change in the first selected section.

Dim rngSection as Range

Set rngSection = Selection.Sections(1).Range
MsgBox "Revisions made by " & rngSection.Revisions(1).Author