Gets or sets the author of the workbook.
Namespace:
Microsoft.Office.Tools.Excel
Assembly:
Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)
Visual Basic (Declaration)
<BrowsableAttribute(False)> _
Public Property Author As String
Dim instance As Workbook
Dim value As String
value = instance.Author
instance.Author = value
[BrowsableAttribute(false)]
public string Author { get; set; }
This property corresponds to the Author field of the workbook's Properties dialog.
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);
}
Reference