Project.SaveAs method (Project)
Saves a file that is not the active project under a new file name.
Syntax
expression.SaveAs (Name, Format, Backup, ReadOnly, TaskInformation, Filtered, Table, UserID, DatabasePassWord, FormatID, Map, ClearBaseline, ClearActuals, ClearResourceRates, ClearFixedCosts)
expression A variable that represents a Project object.
Parameters
Name | Required/Optional | Data type | Description |
---|---|---|---|
Name | Optional | String | The name of the file to save as. If Name is omitted, Project prompts for the file name. |
Format | Optional | Long | The format of the file. The FormatID argument should be used in place of Format, which is included primarily for backwards compatibility. If FormatID is specified, Format is ignored. The default value is pjMPP. Can be one of the PjFileFormat constants. |
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 | Not used. Project can open a project file that an earlier version of Project saved to an ODBC database, but cannot save to an ODBC database. |
DatabasePassWord | Optional | String | Not used. Project cannot save to an ODBC database. |
FormatID | Optional | String | Specifies the file or database format to use. If Project recognizes the format of the file specified with Name, FormatID is ignored. FormatID can be one of the values in the Format strings table. |
Map | Optional | String | The name of the import/export map to use when exporting data. |
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. |
Format strings
Format string | Description |
---|---|
"MSProject.mpp" | Project file |
"MSProject.mpt" | Project template |
"MSProject.mpp.8" | Project 98 file |
"MSProject.mpp.9" | Project 2000–Project 2003 file |
"MSProject.mpp.12" | Project 2007 file |
"MSProject.xls" | Excel workbook |
"MSProject.xls5" | Excel 97–Excel 2003 workbook |
"MSProject.pdf" | PDF file |
"MSProject.xpf" | XPF file |
"MSProject.csv" | CSV (comma delimited) file |
"MSProject.txt" | TXT (tab delimited) file |
"MSProject.xml" | Project XML file |
Remarks
Using the value "MSProject.mpp.9" for the FormatID parameter causes Project to show the Saving to Previous Version - Compatibility Checker dialog box. For example, manually scheduled tasks will be converted to automatically scheduled tasks in previous Project versions. You can choose to keep the format or cancel the save operation. You can also select Don't tell me about this again.
Note
Several FormatID strings are obsolete; if you try to use them, they result in run-time error 1004. FormatID values such as "MSProject.odbc" can be used in Project 2003 and earlier versions but are removed in Project 2007 and later versions.
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.