WorkbookBase.Author Property

Gets or sets the author of the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property Author As String
    Get
    Set
public string Author { get; set; }

Property Value

Type: System.String
The author of the workbook.

Remarks

This property corresponds to the Author field of the workbook's Properties dialog.

Examples

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);
}

.NET Framework Security

See Also

Reference

WorkbookBase Class

Microsoft.Office.Tools.Excel Namespace