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
'Declaration
<BrowsableAttribute(False)> _
Public Property Author As String
'Usage
Dim instance As Workbook
Dim value As String
value = instance.Author
instance.Author = value
[BrowsableAttribute(false)]
public string Author { get; set; }
[BrowsableAttribute(false)]
public:
property String^ Author {
String^ get ();
void set (String^ value);
}
public function get Author () : String
public function set Author (value : String)
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.