Help / Examples / Basics (PowerPoint) / Start Here

Summary

This article details Agile Documents PowerPoint functionality. It builds on what we learned in Word Basics - Start Here, Word Basics - Templates and Word Basics - Find and Insert. Unlike the examples detailed in Word, all the PowerPoint examples are in the same article. Further, this PowerPoint article isn't as detailed as the Word articles. Please note that, where appropriate, concepts discussed in the Word example series apply here even if they aren't explicityly discussed.

Please note that the examples described here are easily installed onto your SharePoint site. That installation procedure is described in Installing Examples.


PowerPoint Template Required

In order to build PowerPoint files, you must specify a PowerPoint template. The template is any PowerPoint slide deck that you wish to use. It defines the style and structure of our Agile Document PowerPoint presentation.

A PowerPoint template tells Agile Documents to use the PowerPoint document engine to build documents. If no template is specified, Agile Documents defaults to using the Word document enginge. Building PowerPoint slides is only supported with the PowerPoint engine. Therefore, ensure you have specified a PowerPoint document to serve as the template -- even if it is blank.


Example 1: Concatenating PowerPoint Slides

This example showcases the use of a template along with the concatenation of slides. This mirrors Example 5 in Word Basics - Templates--except that it uses PowerPoint files instead of Word files.

Figure 1 shows the template. Figures 2 and 3 are screenshots of the two slides we wish to append to the template.

Just like the previous examples, ensure that the folder PowerPoint/EX1 exists within your document library. Then create a new Agile Document through SharePoint Explorer. Go back into SharePoint and rename it EX1.AgileDocument.xml. Create the PowerPoint template of Figure 1 and two separate 1-slide PowerPoint files shown in Figures 2 and 3. Edit the Agile Document so that it looks like Figure 4. Also, ensure you've specified a PPTX output for the Agile Document. Save, build and then review Figure 5.

Congratulations, you've appended two slides to a PowerPoint template!





Example 2: Injecting data into a template

In this example, we use the same template from Example 1. However, instead of inserting slides at the end of the PowerPoint presentation, we inject content at various place holders within the template. Specifically, we insert an image and content from a Word file into our template. As you may have noticed, this mirrors Example 6 in Word Basics - Templates.

Just like the previous examples, ensure that the folder PowerPoint/EX2 exists within your document library. Then create a new Agile Document through SharePoint Explorer. Go back into SharePoint and rename it EX2.AgileDocument.xml. Copy the PowerPoint template of Example 1 / Figure 1. Create the Word document shown in Figure 6. In addition, copy an image into the folder. Edit the Agile Document so that it looks like Figure 7. Also, ensure you've specified a PPTX output for the Agile Document. Save, build and then review Figure 8.

As you've probably noticed, the image was place on slide 1 and the content from the Word file was inserted into the 2nd bullet on page 2. The output is straightforward and expected. However, it's worth noting that fields that have no insertions associated with them remain as they were originally specified in the template.





Example 3: Find and Insert

In this example, we use a new template. This template is combined with data from a SharePoint list item. Content from the SharePoint list item is inserted into the template when fields in the template and list item match. More information is available in examples shown in Word Basics - Find and Insert.

Just like the previous examples, ensure that the folder PowerPoint/EX3 exists within your document library. Then create a new Agile Document through SharePoint Explorer. Go back into SharePoint and rename it EX3.AgileDocument.xml. Create the PowerPoint template shown in Figure 9. Edit the Agile Document so that it looks like Figure 10 where the list item shown in Figure 11. Ensure you've specified a PPTX output for the Agile Document and set Remove Field(s) [If Content Inserted] for the list item. Save, build and then review Figure 12.

In your review, you'll see the the following insertions in the template from the list item:

  • Image in the upper right hand corner of slide 1
  • The sales person's and customer's name at the bottom left of slide 1
  • The second bullet of customer's city and state on slide 2





Example 4: Conditional Content

In this example, we demonstrate Conditional Content as a means to selectively (conditionally) include slides in a presentation. Conditional Content is a way to create different versions of the same document. This example is configured to include only one of the two available slides in the presentation. However, we could have just as easily configured it to include none, the other slide or both based on the information in the List Item. More information and examples relating to Conditional Content can be found in Word Basics - Conditional Content.

This example essentially adds a Find and Insert item and two slides to our Agile Document explained in Example 3. Thus, we use the same template (Figure 9) and List Item (Figure 10). However, we add an additional Find and Insert List Item (Figure 13) and configure it to add to the conditional content keys (Figure 14).

Just like the previous examples, ensure that the folder PowerPoint/EX4 exists within your document library. Then create a new Agile Document through SharePoint Explorer. Go back into SharePoint and rename it EX4.AgileDocument.xml. Copy the PowerPoint template from Example 3 shown in Figure 9. Edit the Agile Document so that it looks like Figures 14, 15 and 16. Notice the newly added Find and Insert List Item has Add to Conditional Content selected. Also notice the Conditional Content Keys specified in Figures 15 and 16. Ensure you've specified a PPTX output for the Agile Document and Remove Field(s) [If Content Inserted] is set for first the List Item. Save, build and then review Figure 17.

In your review, you'll see the slide 1 was inserted but slide 2 was not. That is expected. Because the Clothing by Coco List Item was configured to Add to Conditional Content (Figure 14), "Clothing" and "Electronics" were added to the Conditional Content Keys. Any content that has their Conditional Content Keys specified -- which slide 1 and slide 2 do (Figure 15 and 16) -- are filtered out if their key does not match on of the populated keys in the parent Agile Document Conditional Content Keys setting. Therefore, since slide 1's "Clothing" configuration matches whereas slide 2's "Restaurant" does not, only slide 1 is included in the PowerPoint output document.

Please note that you can dynamically associate a Favorite Agile Document to a Find and Insert Item through SharePoint Explorer. This is further explained in Example 10 in Word Basics - Find and Insert.