Workbook Properties (2007 ...


Visual Studio Tools for Office API Reference
Workbook..::.Author Property (2007 System)

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)
Syntax

Visual Basic (Declaration)
<BrowsableAttribute(False)> _
Public Property Author As String
Visual Basic (Usage)
Dim instance As Workbook
Dim value As String

value = instance.Author

instance.Author = value
C#
[BrowsableAttribute(false)]
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.

Visual Basic
Private Sub DisplayWorkbookAuthor()
    Me.Author = System.Environment.UserName
    MsgBox("The creator of this workbook is: " & _
        Me.Author)
End Sub
C#
private void DisplayWorkbookAuthor()
{
    this.Author = System.Environment.UserName;
    MessageBox.Show("The creator of this workbook is: " +
        this.Author);
}
Permissions

See Also

Reference

Tags :


Page view tracker