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.String

    Required String. The name of the file to add to the list of files on the task pane.

  • DisplayName
    Type: System.Object

    Optional Object. The text to display in the task pane.

Return Value

Type: System.Boolean

Remarks

This method returns True if the item was successfully added; False otherwise.

See Also

Reference

NewFile Interface

NewFile Members

Microsoft.Office.Core Namespace