Message-ID: <971202829.10393.1711723566153.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_10392_2027434654.1711723566153" ------=_Part_10392_2027434654.1711723566153 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
PowerPointTemplate= provides an intuitive high-performance way to import database values t= o a presentation, but cannot otherwise modify a presentation at runtime. Th= e PowerPointApplication object model allows you to modify additional aspects of the presentation = at runtime.
You can take advantage of the features of both PowerPointApp= lication and PowerPointTemplate by using them together. For example, you ca= n use PowerPointTemplate to open and populate a PowerPointWriter template, = then pass the populated presentation to PowerPointApplication to modify doc= ument properties.To pass a presentation from PowerPointTemplate to PowerPointApplication,= do not call PowerPointT= emplate.Save. Instead, pass the PowerPointTemplate object to PowerPoint= Application's Open method:
PowerPointTemplate pptt =3D new PowerPointTemplate(); pptt.Open(templatePath); pptt.BindData(valuesArray, colNamesArray,"DataSourceName", pptt.C= reateDataBindingProperties()); 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 =3D new PowerPointApplication(); Presentation pres =3D ppta.Open(pptt);=20
Dim pptt As PowerPointTemplate =3D new PowerPointTemplate(); pptt.Open(templatePath); pptt.BindData(valuesArray, colNamesArray,"DataSourceName", pptt.C= reateDataBindingProperties()); pptt.Process(); //--- Create an instance of PowerPointApplication and //--- open the presentation you created with PowerPointTemplate. //--- The presentation will be returned as a Presentation //--- object. Dim ppta As PowerPointApplication =3D new PowerPointApplication(); Dim pres As Presentation =3D ppta.Open(pptt);=20
To pass a presentation from PowerPointApplication to PowerPointTemplate,= do not call PowerPoi= ntApplication.Save. Instead, pass the PowerPointApplication object, along with the Presentation object that you want to popu= late, to PowerPointTemplates's Open method:
PowerPointApplication ppta =3D new PowerPointApplication(); Presentation present =3D ppta.Open("StartingFile.pptx"); //--- Code modifying and customizing the presentation here PowerPointTemplate ppt =3D new PowerPointTemplate(); ppt.Open(ppta, present);=20
Dim ppta As PowerPointApplication =3D new PowerPointApplicatio= n(); Dim present As Presentation =3D ppta.Open("StartingFile.pptx"); //--- Code modifying and customizing the presentation here Dim ppt As PowerPointTemplate =3D new PowerPointTemplate(); ppt.Open(ppta, present);=20