...
To pass a presentation from PowerPointTemplate to PowerPointApplication, do not call PowerPointTemplate.Save. Instead, pass the PowerPointTemplate object to PowerPointApplication's Open method:
Code Blockcsharp | ||
---|---|---|
c# | c# | PowerPointTemplate pptt = new PowerPointTemplate(); pptt.Open(templatePath); pptt.BindData(valuesArray, colNamesArray,"DataSourceName", pptt.CreateDataBindingProperties()); pptt.Process(); //--- Create an instance of PowerPointApplication and //--- open the presentation you created with PowerPointTemplate. //--- The presentation will be returned as a Presentation //--- object. PowerPointApplication ppta = new PowerPointApplication(); Presentation pres = ppta.Open(pptt); |
Vbnet |
---|
Option Strict On Dim pptt As PowerPointTemplate = new PowerPointTemplate(); //--- Create an instance of PowerPointApplication and |