Writing Document Summary

VSTO

Below is the code for writing document summary of Visio:

  Application.ActiveDocument.Creator = "Zeeshan";

 Application.ActiveDocument.Company = "Aspose";

 Application.ActiveDocument.Category = "Drawing 2D";

 Application.ActiveDocument.Manager = "Self";

 Application.ActiveDocument.Title = "Zeeshan";

 Application.ActiveDocument.Subject = "Visio Diagram";

Aspose.Diagram

Writing Microsoft Visio Document Summary Info

The DocumentProperties class exposes a number of properties to set or get a Microsoft Visio diagram’s summary information. Aspose.Diagram for .NET can update the drawing summary information and then write the drawing file back to VDX.

To update the drawing summary information of an existing VDX or VSD file:

  1. Create an instance of the Diagram class.
  2. Set properties exposed by Diagram.DocumentProps to define the summary information for the Visio drawing file.
  3. Call the Diagram class' Save method to write the Visio drawing file to VDX.

Check the summary information:

  1. Open the output VDX file in Microsoft Visio.
  2. Selecting Info from the File menu.
  //Call the diagram constructor to load diagram from a VDX file

 Diagram vdxDiagram = new Diagram("Drawing1.vdx");

 //Set some summary information about the diagram

 vdxDiagram.DocumentProps.Creator = "Ijaz";

 vdxDiagram.DocumentProps.Company = "Aspose";

 vdxDiagram.DocumentProps.Category = "Drawing 2D";

 vdxDiagram.DocumentProps.Manager = "Sergey Polshkov";

 vdxDiagram.DocumentProps.Title = "Aspose Title";

 vdxDiagram.DocumentProps.TimeCreated = DateTime.Now;

 vdxDiagram.DocumentProps.Subject = "Visio Diagram";

 vdxDiagram.DocumentProps.Template = "Aspose Template";

 //Write the updated file to the disk in VDX file format

 vdxDiagram.Save("output.vdx", SaveFileFormat.VDX);

Download Sample Code

Download Running Code