Home | Products | PowerPoint | PowerPoint Tutorials | Office Themes

XML Editing in Visual Studio Express with 7-Zip

Explore how you can edit PowerPoint presentations and templates and also Office Themes within Visual Studio Express with a little help from 7-Zip.


Author:







A PPTX file or any of the new file formats that Office 2007 and later use such as POTX or THMX are different than the older binary file formats such as PPT. That’s because these new file formats that end with an “X” are essentially XML based file formats.

Even more interesting is the fact that the actual file is not an XML based file but only a wrapper that contain many disparate and related XML based elements. The wrapper technology used is just simple ZIP technology. If you want to edit Office XML files, you will therefore need to unzip, edit, and finally zip the file. Alternatively, you can perform XML Editing within Visual Studio 2010. While the former process is time consuming and error prone, the latter process requires that you buy a copy of Visual Studio 2010 – a product that is expensive and no longer available! Unfortunately, the process of editing Office XML files does not work as well in later versions of Visual Studio.

There is a third, more effective way of achieving the same results using 7-Zip and Visual Studio Express -- both of these products are free!

Echo Swinford This technique of using 7-Zip and Visual Studio Express was discovered by Echo Swinford -- thank you so much, Echo. Here's a link to her original article.

Echo has also co-authored Building PowerPoint Templates with Julie Terberg -- this book is a great resource for anyone who works with PowerPoint templates.

Before you start, you must have these two programs installed:

  1. Download 7-Zip and install.

  2. Download Visual Studio 2010 Express -- you just need Visual Basic 2010 Express rather than the entire Visual Studio 2010 Express package. Even if you downloaded the entire Visual Studio 2010 Express package, you can opt to install just the Visual Basic part, as shown highlighted in red within Figure 1, below.

    Visual Basic 2010 Express is all you need
    Figure 1: Visual Basic 2010 Express is all you need

Once both the programs are installed on your computer, follow these steps:

  1. Launch 7-Zip File Manager from the Start menu. This opens the 7-Zip File Manager window, as shown in Figure 2. Within this window, click the Tools option (highlighted in red within Figure 1). From the resultant drop-down menu, select Options.

    7-Zip File Manager window
    Figure 2: 7-Zip File Manager window

  2. This opens the Options dialog box as shown in Figure 3 -- within this dialog box, select the Editor tab (highlighted in red within Figure 3). Then click the Browse button, highlighted in blue within Figure 3.

    Editor tab
    Figure 3: Editor tab

  3. Navigate to, and select the vbexpress.exe file as shown highlighted in red within Figure 4. This file will be typically located within the C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE folder. Thereafter, click the Open button.

    vbexpress.exe file selected
    Figure 4: vbexpress.exe file selected

    This will take you back to Options window. Click the OK button here to proceed.

  4. Then, using the navigation bar (highlighted in red within Figure 5) access the folder where your PPTX / POTX / THMX file is located. Select the file which you want to edit -- make sure you just click once to select the file (don't double click).

    PPTX file to be edited is selected
    Figure 5: PPTX file to be edited is selected

  5. With the PPTX / POTX / THMX file selected, choose the File | Open Inside menu option, as shown in Figure 6.

    File | Open Inside menu option
    Figure 6: File | Open Inside menu option

  6. This opens the selected PPTX / POTX / THMX file within the 7-Zip File Manager with all of its content, as shown in Figure 7. Here select the ppt folder (refer to Figure 7 again).

    PPTX file opened within the 7-Zip File Manager
    Figure 7: PPTX file opened within the 7-Zip File Manager

  7. Now, navigate to and select the XML file you want to edit. For example, we selected the ppt\theme\theme1.xml file, as shown in Figure 8.

    XML file to be edited is selected
    Figure 8: XML file to be edited is selected

  8. With the XML file selected, make sure you do not double-click! Instead, choose the File | Edit menu option as shown in Figure 9.

    File | Edit menu option
    Figure 9: File | Edit menu option

  9. This will open the selected XML file within Visual Basic Express, as shown in Figure 10.

    Selected XML file opened within Visual Basic Express
    Figure 10: Selected XML file opened within Visual Basic Express

  10. To view the entire document for easier editing, select the Edit | Format Document menu option as shown in Figure 11. You can also use the keyboard sequence Ctrl+K, Ctrl+D in quick succession.

    Edit | Format Document menu option
    Figure 11: Edit | Format Document menu option

  11. This displays the document code hierarchically, as shown in Figure 12. Make edits as required. For example, we wanted to change the Theme name (text highlighted in orange within Figure 12) and Theme Color name (text highlighted in pink within Figure 12).

    Entire document's code view
    Figure 12: Entire document's code view

  12. Change the text just by selecting the old text and typing the new one. We changed both the Theme name and the Theme Color name to 'Test 1" as shown in Figure 13.

    Theme name and Theme Color name changed
    Figure 13: Theme name and Theme Color name changed

  13. Once done, save the XML file using the Ctrl+S keyboard shortcut and close the Visual Basic Express interface . This opens a 7-Zip message window as shown in Figure 14.

    7-Zip message window
    Figure 14: 7-Zip message window

    Click OK and your editing work is completed.

  14. Now if you open your edited PPTX / POTX / THMX file within PowerPoint, you can see the changes. Figure 15 shows our sample PPTX file in PowerPoint 2010. Notice the Theme name (highlighted in red within Figure 15) and Theme Colors name (highlighted in blue within Figure 15) changed to "Test 1".

    PowerPoint presentation reflecting the changed Theme name and Theme Color name
    Figure 15: PowerPoint presentation reflecting the changed Theme name and Theme Color name

 

PowerPoint Keyboard Shortcuts PowerPoint Keyboard Shortcuts and Sequences:
PowerPoint 2013, 2011, 2010, 2007 and 2003

Have your ever used keyboard shortcuts and sequences in PowerPoint? Or are you a complete keyboard aficionado? Do you want to learn about some new shortcuts? Or do you want to know if your favorite keyboard shortcuts are documented?

Go and get a copy of our PowerPoint Keyboard Shortcuts and Sequences E-Book.

PowerPoint Keyboard Shortcuts and Sequences E-book

 



comments powered by Disqus




Subscribe to Indezine
Follow Indezine

Follow Indezine on Pinterest
Share This Page
Bookmark and Share
Translate Page


Like This Page
Like This Site



Microsoft and the Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.

Home | PowerPoint | Photoshop | PowerPoint Templates | PowerPoint Tutorials | Blog | Notes | Ezine | Advertise | Feedback | Site Map | About Us | Contact Us

Link to Us | Privacy | Testimonials

PowerPoint Backgrounds | Christian PowerPoint Backgrounds | Business PowerPoint Presentation Templates

Plagiarism will be detected by Copyscape

©2000-2016, Geetesh Bajaj. All rights reserved.

since November 02, 2000