FileSaveAs Method

Saves the active project under a new file name or exports data.

Syntax

expression**.FileSaveAs(Name, Format, Backup, ReadOnly, TaskInformation, Filtered, Table, UserID, DatabasePassWord, FormatID, Map, Password, WriteResPassword, ClearBaseline, ClearActuals, ClearResourceRates, ClearFixedCosts, XMLName)**

*expression   *     Optional. An expression that returns an Application object.

Name Optional String. The name of a new project under which the active project will be saved or the name of the database where the data will be exported.

PjFileFormat

Constant
pjMPP
pjMPT
pjCSV
pjTXT
pjXLS

Backup    Optional Boolean. True if Project makes a backup copy of the file.

ReadOnly    Optional Boolean. True if Project should display an alert recommending that the project be opened read-only. The default value is False.

TaskInformation    Optional Boolean. True if task information is saved, for a project saved under a non-Project file format. False if resource information is saved. If Map is specified, TaskInformation is ignored. The default value is True if the active view is a task view and False otherwise.

Filtered    Optional Boolean. True if filtered tasks or resources are saved, for a project saved under a non-Project file format. False if all the tasks or resources are saved. If Map is specified, Filtered is ignored. The default value is False.

Table    Optional String. The name of the table containing the task or resource information, for a project saved under a non-Project format. If Map is specified, or Name specifies a database file or format, Table is ignored. The default value is the name of the active table.

UserID    Optional String. A user ID to use when accessing a database. If Format or FormatID is not a database, UserID is ignored.

DatabasePassWord    Optional String. A password to use when accessing a database. If Format or FormatID isn't a database, DatabasePassWord is ignored.

format strings

Format String Description
"MSProject.mpp" Project file
"MSProject.mpt" Project template
"MSProject.mpd" Project database
"MSProject.mpw" Project workspace
"MSProject.mpp.8" Project 98 file
"MSProject.odbc" ODBC database
"MSProject.mdb" Microsoft Access database
"MSProject.xls5" Microsoft Excel 5.0/95 (7.0) workbook
"MSProject.pivot5" Microsoft Excel 5.0/95 (7.0) pivot table
"MSProject.csv" CSV (Comma delimited) file
"MSProject.txt" TXT (Tab delimited) file
"MSProject.html" HTML document
"MSProject.XML" XML document

Map    Optional String. The name of the import/export map to use when exporting data.

Password    Optional String. A password to use when helping protect project files. The password is case-sensitive and may not be more than 15 characters long.

WriteResPassword    Optional String. A password to use when write-reserving a project file. The password is case-sensitive and may not be more than 15 characters long.

ClearBaseline    Optional Boolean. True if baseline values (the Baseline Cost, Baseline Work, Baseline Start, Baseline Finish, Baseline Duration, Timephased Baseline Work and Timephased Baseline Cost fields) are cleared when saving as a template. The default value is False.

ClearActuals    Optional Boolean. True if actual values (the % Complete field and, if actual costs are not calculated by Project, the Actual Cost field) are cleared when saving as a template. The default value is False.

ClearResourceRates    Optional Boolean. True if resource rate tables are cleared when saving as a template. The default value is False.

ClearFixedCosts    Optional Boolean. True if the Fixed Costs field is cleared for all tasks when saving as a template. The default value is False.

XMLName    Optional String. The XML DOM object that is passed to the function when FormatID is MSProject.XML.

Remarks

In Microsoft Office Project Professional   2003, you must add "<>\" and include a version for the Name argument when saving to the enterprise. For example, to save a file to Project Server from Microsoft Office Project Professional   2003, use the following syntax:

FileSaveAs Name:="<>\FileName.Published"

Applies to | Application Object

See Also | DeleteFromDatabase Method | FileOpen Method | FileSave Method | FileSaveWorkspace Method | MapEdit Method | MapList Property | ODBCCreateDataSource Method | Quit Method