The following code example uses the Author property to set the author of the document to the current user, and then displays the author name.
This example is for a document-level customization.
Private Sub DisplayWorkbookAuthor()
Me.Author = System.Environment.UserName
MsgBox("The creator of this workbook is: " & _
Me.Author)
End Sub
private void DisplayWorkbookAuthor()
{
this.Author = System.Environment.UserName;
MessageBox.Show("The creator of this workbook is: " +
this.Author);
}