Application.FileSaveAs method (Project)
Saves the active project to a new file name or exports data to a file.
expression.FileSaveAs (Name, Format, Backup, ReadOnly, TaskInformation, Filtered, Table, UserID, DatabasePassWord, FormatID, Map, Password, WriteResPassword, ClearBaseline, ClearActuals, ClearResourceRates, ClearFixedCosts, XMLName, ClearConfirmed)
expression A variable that represents an Application object.
|Name||Optional||String||The name of a project file.|
|Format||Optional||PjFileFormat||Specifies the file format. 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. Can be one of the PjFileFormat constants. The default is pjMPP.|
|Backup||Optional||Boolean||True if Project creates a backup copy of the file. The default is False.|
|ReadOnly||Optional||Boolean||True if Project should display an alert recommending that the file be opened read-only. If selectively exporting data instead of saving a complete project, ReadOnly is ignored. The default value is False.|
|TaskInformation||Optional||Boolean||True if task information is saved in a non-project file format. The Map argument should be used in place of TaskInformation, which is included primarily for backward compatibility. If Map is specified, TaskInformation is ignored. The default value is True if the active view is a task view; otherwise, it is False.|
|Filtered||Optional||Boolean||True if filtered tasks or resources are saved, for a project saved in 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||Variant||The name of the table containing resource or task information for a project saved in a non-Project file format. The Map argument should be used in place of Table, which is included for backward compatibility. If Map is specified, or Name specifies a project file 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 a database.|
|DatabasePassWord||Optional||String||Not used. Project cannot save to an ODBC database.|
|FormatID||Optional||String||Specifies the file format to use. If Project recognizes the format of the file specified by Name, FormatID is ignored. FormatID can be one of the following format string values for saving files.|
|Map||Optional||String||The name of the import/export map to use when exporting data.|
|Password||Optional||String||A password to use when opening password-protected project files. If Password is incorrect or omitted and a file requires a password, the user is prompted for the password.|
|WriteResPassword||Optional||String||A password to use when writing to a write-reserved project file. If WriteResPassword is omitted and the file requires a password, the user is prompted for the password.|
|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||Variant||This is the XML DOM object that is passed to the function when FormatID is "MSProject.XML". The FileSaveAs method fails if the XML format is specified and XMLName is not a valid XML DOM object. If FormatID is anything other than "MSProject.XML", XMLName should be NULL and the method should fail. Only one of XMLName or Name can be specified.|
|ClearConfirmed||Optional||Boolean||True if the information is cleared about whether tasks have been confirmed as published to Project Server. The default value is False.|
|"MSProject.mpp.8"||Project 98 file|
|"MSProject.mpp.9"||Project 2000–Project 2003 file|
|"MSProject.mpp.12"||Project 2007 file|
|"MSProject.xls5"||Excel 97–Excel 2003 workbook|
|"MSProject.csv"||CSV (comma delimited) file|
|"MSProject.txt"||TXT (tab delimited) file|
|"MSProject.xml"||Project XML file|
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.
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.