Skip to content

Instantly share code, notes, and snippets.

@aspose-com-kb
Last active December 23, 2021 12:32

Revisions

  1. aspose-com-kb revised this gist Dec 23, 2021. No changes.
  2. aspose-com-kb revised this gist Dec 16, 2021. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions How to Convert MPP to XPS using C++.cpp
    Original file line number Diff line number Diff line change
    @@ -27,8 +27,8 @@ void MPPToXPS()
    SharedPtr<License> AsposeTasksLicense = System::MakeObject<License>();
    AsposeTasksLicense->SetLicense(u"licFile");

    // The path to the documents directory.
    System::String SourceFile = u"SourceMicrosoftProjectFile.mpp";
    // The path to sour MPP file and directory.
    System::String SourceFile = u"SourceMPPFile.mpp";

    // Load the source MPP file to export to XPS
    SharedPtr<Project> MppToXps = MakeObject<Project>(SourceFile);
  3. aspose-com-kb created this gist Dec 13, 2021.
    38 changes: 38 additions & 0 deletions How to Convert MPP to XPS using C++.cpp
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    #pragma once

    #include <Project.h>
    #include <Task.h>
    #include<License/License.h>
    #include<Saving/Enums/SaveFileFormat.h>
    #include<Prj.h>
    #include <system/string.h>
    #include <system/console.h>
    #include <system/environment.h>
    #include <system/shared_ptr.h>
    #include <system/environment.h>
    #include <system/object_ext.h>
    #include <system/object.h>
    #include <stdio.h>


    using namespace Aspose::Tasks;
    using namespace Aspose::Tasks::Saving;
    using namespace System;


    void MPPToXPS()
    {

    // Set license to perform MPP to XPS conversion
    SharedPtr<License> AsposeTasksLicense = System::MakeObject<License>();
    AsposeTasksLicense->SetLicense(u"licFile");

    // The path to the documents directory.
    System::String SourceFile = u"SourceMicrosoftProjectFile.mpp";

    // Load the source MPP file to export to XPS
    SharedPtr<Project> MppToXps = MakeObject<Project>(SourceFile);

    // Save the MPP to XPS in C++
    MppToXps->Save(u"MPPSavedToXPS.xps", SaveFileFormat::XPS);
    }