MPPSaveOptions Class

Allows to specify additional options when saving project data to MPP.
Inheritance Hierarchy
SystemObject
  Aspose.Tasks.SavingMPPSaveOptions

Namespace:  Aspose.Tasks.Saving
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 21.10
Syntax
public class MPPSaveOptions

The MPPSaveOptions type exposes the following members.

Constructors
  NameDescription
Public methodMPPSaveOptions
Initializes a new instance of the MPPSaveOptions class
Properties
  NameDescription
Public propertyCode exampleProtectionPassword
Gets or sets a password which is used to protect a resulting MPP file. Currently is supported for MS Project 2010 and newer formats.
Remarks
Null value indicates that the project file is not protected.
Public propertyCode exampleRemoveInvalidAssignments
Gets or sets a value indicating whether to remove invalid resource assignments when saving to MPP.
Remarks
MS Project creates an empty resource assignment for each task. Set this flag to true to remove them on save.
Public propertyCode exampleWriteViewData
Gets or sets a value indicating whether to write view data when saving to MPP.
Remarks
View data includes Project.Views, Filters and Tables collections.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
Shows how to save project into a stream as an MPP file.
using (var stream = new FileStream(OutDir + "EmptyProjectSaveStream_out.xml", FileMode.Create, FileAccess.Write))
{
    var project = new Project(DataDir + "EstimatedMilestoneTasks.mpp");

    // create save options
    var options = new MPPSaveOptions
    {
        // sets a value indicating whether to remove invalid resource assignments when saving to MPP
        RemoveInvalidAssignments = true
    };

    // save MPP with options
    project.Save(stream, options);
}
See Also