NewFile.Add method (Office)

Adds a new item to the New Item task pane. Returns a Boolean value to indicate whether the operation was successful.

Syntax

expression.Add (FileName, Section, DisplayName, Action)

expression Required. A variable that represents a NewFile object.

Parameters

Name Required/Optional Data type Description
FileName Required String The name of the file to add to the list of files on the task pane.
Section Optional Variant The section to which to add the file. Can be any msoFileNew constant.
DisplayName Optional Variant The text to display in the task pane.
Action Optional Variant The action to take when a user clicks the item. Can be any msoFileNew constant.

See also

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.