

This is an additional practice for lesson 3 of the Office Online Training course Open XML II: Editing documents in the XML (link to come). In the course itself, you were able to practice in Word. This additional practice session provides steps and a sample file for practicing tasks from this lesson in PowerPoint.
Note: It is strongly recommended that you view lesson 3 of the above-referenced course and complete the Word practice session in that course before proceeding with this practice session.
You may want to print these instructions before beginning the exercise, so that you can easily keep them visible. To download the sample file required for this exercise, click here.
******************* ready to begin? .... here you go.... *******************************
After you download the sample file, open the file in PowerPoint. In this exercise, you will remove a custom slide layout from the sample presentation by deleting the applicable document part and related references from the document ZIP package. If you right-click the first slide in the open presentation and then point to Layout, you see that the title slide uses a custom layout named Title Slide with Picture. Also notice, as in the following image, that this custom layout is the third layout in the layout gallery.

1. Save a copy of the open document with a .zip file extension, as follows:
- Click the Microsoft Office Button and then click Save As. In the Save As dialog box, in the Save as type list, select PowerPoint Presentation (*.pptx).
- Type “Sample.zip” in the File Name box, including the quotation marks.
- Select the Desktop as the location in which to save this file. Then click Save.
2. Close the document. Then press CTRL+D to view your desktop, and double-click the file to open the ZIP package.
3. Double-click the ppt folder to open it, and then double-click the slideLayouts subfolder to open it. Select slideLayout3.xml and press DELETE. When prompted, click Yes to confirm the deletion.
Note: Slide layout document parts are numbered according to their order in the layout list. Because this layout appeared third in the list of layouts in the presentation, you know that the slideLayout3.xml part is the correct part to delete. However, remember that you can double-click the file to open it in your default XML viewer if you want to confirm that it is the correct file before you delete it.
When you delete the document part, you also must delete all references to that part that exist in the ZIP package. Because the deleted layout is currently applied to a slide, you will also need to associate a different layout with that slide.
4. Double-click the _rels subfolder inside the slideLayouts folder. Then select slideLayout3.xml.rels and press DELETE. When prompted, click Yes to confirm the deletion.
5. In the ppt folder, double-click to open the slideMasters subfolder, and then click the _rels subfolder inside the slideMasters folder. Select and then copy the file slideMaster1.xml.rels and paste it on the desktop.
6. Open slideMaster1.xml.rels in both your default XML viewer and XML editor. In the viewer, notice that a relationship definition exists for each slide layout that is associated with the slide master. Find the relationship for the deleted document part (slideLayout3.xml). As shown in the following image, that relationship is rID3 in this example.
![]()
7. In your XML editor, find and delete the relationship definition for slideLayout3.xml, as shown in the preceding image. Then save the file.
8. In your XML viewer, refresh the page to confirm that there are no errors. Then close both the viewer and editor, and copy slideMaster1.xml.rels back into the ZIP package, replacing the original file of the same name.
9. In the slideMasters folder, select and copy the file slideMaster1.xml and paste it onto your desktop. Then open the file in both your XML viewer and editor.
10. In your XML editor, find the tag sldLayoutIdLst, which lists the relationship IDs for each slide layout attached to this slide master. Locate the sldLayoutID tag for the relationship ID that you deleted in step 7 (rID3) and delete it. Save the file and then, in your XML viewer, refresh the page to confirm that there are no errors.
11. Copy slideMaster1.xml back into the ZIP package, replacing the original file of the same name.
12. In the ppt folder, double-click to open the slides subfolder. The deleted layout was applied to slide 1. However, the information that relates the slide to its applied layout is not located in slide1.xml. It is located in the _rels subfolder, in the file named slide1.xml.rels. Select and copy slide1.xml.rels and paste it on the desktop.
Note: Remember that a relationship (.rels) file is where information is stored that defines relationships between elements in a ZIP package. A slide layout is associated with a slide by indicating that relationship in a .rels file.
13. Open slide1.xml.rels in both your XML viewer and editor. Notice, as shown in the following image, that the relationship rID1 indicates that the slide is attached to layout 3.
![]()
14. In your XML editor, change slideLayout3.xml to slideLayout1.xml, to associate this slide with the Title Slide layout (the first layout in the layout list). Save the file and then refresh the page in your XML viewer to confirm that there are no errors in the file.
15. Copy slide1.xml.rels back into the ZIP package, replacing the original file of the same name. Then close the ZIP package.
16. Change the file extension for this presentation back to .pptx and then double-click to open the presentation in PowerPoint.
If no error occurs when you open the presentation and there is no longer a picture on the title slide, right-click the slide and point to Layout to confirm that the first slide is attached to the Title Slide layout.
Congratulations! You have just successfully deleted a document part from a PowerPoint ZIP package.