NewFile.Add Method
Adds a new item to the New Item task pane.
Namespace: Microsoft.Office.Core
Assembly: office (in office.dll)
Syntax
'Declaration
Function Add ( _
FileName As String, _
Section As Object, _
DisplayName As Object, _
Action As Object _
) As Boolean
'Usage
Dim instance As NewFile
Dim FileName As String
Dim Section As Object
Dim DisplayName As Object
Dim Action As Object
Dim returnValue As Boolean
returnValue = instance.Add(FileName, Section, _
DisplayName, Action)
bool Add(
string FileName,
Object Section,
Object DisplayName,
Object Action
)
Parameters
FileName
Type: System.StringRequired String. The name of the file to add to the list of files on the task pane.
Section
Type: System.ObjectOptional Object. The section to which to add the file. Can be any MsoFileNewSection constant.
DisplayName
Type: System.ObjectOptional Object. The text to display in the task pane.
Action
Type: System.ObjectOptional Object. The action to take when a user clicks on the item. Can be any MsoFileNewAction constant.
Return Value
Type: System.Boolean
Remarks
This method returns True if the item was successfully added; False otherwise.