Microsoft Office Tutorials and References
In Depth Information
Adding a page as a background for another page
The dynamically-created square shape, with the text Packt Shape One , will be
created, as shown in the following screenshot:
Adding a page as a background for another page
Let's see how to use a page as a background for another page. In this example, a
document will contain two pages—the first page will be the work space that holds all
of the shapes and objects, while the other page will act as the background image for
the first page.
Open Visual Studio 2008 to create a new Visio solution, as explained earlier.
In the ThisAddIn.cs file, write the following program to create a Visio
document dynamically:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
// Instance for Document object and calling the Add method on
the Document collection
Visio.Document PacktVisioDocument = this.Application.
// Instance of Shape object
// Page Object has a PageSheet to set other page properties
Visio.Shape PacktShape = PacktVisioDocument.Pages[1].PageSheet;
// Set the page width property
PacktShape.get_Cells("PageWidth").Formula = "6 in";
Search JabSto ::

Custom Search