NewFile.Remove Method (Office)
Removes an item from the New Item task pane. Returns a Boolean value to indicate whether the operation was successful.
Syntax
expression .Remove(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 reference. |
Section |
Optional |
Variant |
The section of the task pane where the file reference exists. Can be any msoFileNew constant. |
DisplayName |
Optional |
Variant |
The display text of the file reference. |
Remarks
The arguments supplied to the Remove method must match the arguments that were supplied to the Add method of the NewFile object, or the Remove method will fail. For example, if the Action argument was supplied when the NewFile object was added, then the same Action argument must be supplied to remove the NewFile object, or the Remove method will fail.