C# Sample code for generating VSTX documents. Use this code for creating VSTX files within VB.NET, Asp.NET or any .NET based application....the first page of the diagram. Add text in the page. Use Save...the first page of the diagram. Page page = diagram.Pages[ 0 ]; //...