Microsoft Office Tutorials and References
In Depth Information
Creating a presentation at runtime
VSTO provides you with the inest options for customizing Microsoft Office
PowerPoint 2007, which macros don't have. A macro is a series of commands that are
executed in sequence. Macros are programmed using Visual Basic Script VBScript ), (
and are vulnerable to security. VSTO provides full support for C# or VB.NET, the
programming languages supported by the .NET framework.
Creating a presentation at runtime
The VSTO 3.0 project template automatically loads the entire alias to your Microsoft
Office PowerPoint solution. You can easily reference this through the namespaces
and classes available, in order to to build your custom solution for PowerPoint 2007.
Now, let's see how to create a PowerPoint presentation at runtime, using VSTO 3.0
for Microsoft PowerPoint 2007.
Open Visual Studio 2008 and create a new solution. Refer to the previous example
for complete instructions on how to do this. Write the following code to create a
presentation in Microsoft Office PowerPoint 2007 in the ThisAddIn.cs file:
private void ThisAddIn_Startup(object sender, System.EventArgs e)
// Creating PowerPoint presentation with single slide in it
// Using the PowerPoint object instance adding the
// Slide with text title structure to the current Presentation
PowerPoint.Presentation PacktPresentation = this.Application.
Search JabSto ::

Custom Search