Save

Save(string, MPPSaveOptions)

Saves the document to mpp file format using the specified save options.

public void Save(string filename, MPPSaveOptions options)
Parameter Type Description
filename String The file name.
options MPPSaveOptions The save options.

Examples

Shows how to save project as an MPP file.

var project = new Project();
var options = new MPPSaveOptions();
project.Save(OutDir + "EmptyProjectSaveStream_out.xml", options);

See Also


Save(string, SaveOptions)

Saves the document to a file using the specified save options.

public void Save(string filename, SaveOptions options)
Parameter Type Description
filename String The file name.
options SaveOptions The save options.

Examples

Shows how to save project as an MPP file.

var project = new Project();
var options = new MPPSaveOptions();
project.Save(OutDir + "EmptyProjectSaveStream_out.xml", options);

See Also


Save(string, SaveFileFormat)

Saves the project data to the file.

public void Save(string filename, SaveFileFormat format)
Parameter Type Description
filename String The file name.
format SaveFileFormat The save file format.

Examples

Shows how to create a project and save it into MPP format without passing of an MPP template file.

var project = new Project();

// The project will be saved into MPP by using internal MPP template.
project.Save(OutDir + "CreateEmptyProjectSaveMPP_out.mpp", SaveFileFormat.Mpp);

See Also


Save(string)

Saves the project data to the file in mpp format.

public void Save(string filename)
Parameter Type Description
filename String The file name.

See Also


Save(Stream, SaveOptions)

Saves the project to a stream using the specified save options.

public void Save(Stream stream, SaveOptions options)
Parameter Type Description
stream Stream The stream.
options SaveOptions The save options.

Examples

Shows how to save project into a stream as an image and to control image options.

var project = new Project();

using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
{
    var options = new ImageSaveOptions(SaveFileFormat.Png);

    // by using of ImageSaveOptions we save the project into image format
    project.Save(stream, options);
}

See Also


Save(Stream, MPPSaveOptions)

Saves the project to a stream using the specified save options.

public void Save(Stream stream, MPPSaveOptions options)
Parameter Type Description
stream Stream The stream.
options MPPSaveOptions The save options.

Examples

Shows how to save project into a stream as an MPP file by using MPP save options.

using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
{
    var project = new Project();
    var options = new MPPSaveOptions();

    // by using of MPPSaveOptions we save it in MPP format
    project.Save(stream, options);
}

See Also


Save(Stream, SaveFileFormat)

Saves the project data to the stream.

public void Save(Stream stream, SaveFileFormat format)
Parameter Type Description
stream Stream The stream.
format SaveFileFormat the specified save file format.SaveFileFormat

Examples

Shows how to save project into a stream as an XML MS Project file.

var project = new Project();

using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
{
    // Write the stream into XML format
    project.Save(stream, SaveFileFormat.Xml);
}

See Also