none
Mimic Powerpoint 2k10's "Create Handouts" feature with C# VSTO / interop RRS feed

  • Question

  • i want to mimic PowerPoint 2010's "Create Handouts" (File > Save & Send > Create Handouts > Create Handouts) feature using VSTO & C#.
    that is, i want to create a PowerPoint add-in that creates a new Word document, copy & pastes slide per slide to the Word document and adds some text below the slide (and does some other stuff as well).

    it seems the "Create Handouts" function is just some kind of macro (you can undo the creation of the Word document step by step).

    so, any ideas how to copy the current slide and paste it to a Word doc programmatically and add the notes below that?

    thanks,
    Tom
    Wednesday, April 6, 2011 5:53 PM

Answers

  • Cindy,

     

    thanks for your answer. i already managed to mimic that function using Word/PowerPoint interop, exporting slide per slide as EMF and importing it to Word. its very slow but works.

    i've looked into Office Open XML SDK but found it much more difficult to use and much worse documented. while interop is slow as hell its at least easy to use.

    for example, i wasn't able to find a single source on how to extract a slide and import it to word using the Office Open XML SDK. nothing.

    also, given this is going to be a PowerPoint VSTO add-on, the user has to have office installed anyways.

    thanks,

    Tom

    Thursday, April 7, 2011 7:13 AM

All replies

  • Hi Tom

    I know a couple of PowerPoint MVPs have created similar functionality, over the years. The best place to ask this would probably be where those folks hang out. As far as I know, that would be in the "Answers" namespace:

    http://answers.microsoft.com/en-us/office/forum/powerpoint?page=1

    or

    http://answers.microsoft.com/en-us/office/forum/customize?page=1

    FWIW, that feature probably isn't a macro in the sense of the term that VBA code is running. But the feature would be automating the Word application (using Microsoft.Office.Interop.Word namespace), thus the automation steps are being recorded. You certainly can do the same thing, but...

    It would be much more efficient to generate the file using Office Open XML. This works without using the Word application (but the finished document can then be opened in Word). It would also allow you to read/extract what you want from the closed PowerPoint file, FWIW :-) More information on Open XML can be found at OpenXMLDeveloper.org and in the Open XML SDK forum.


    Cindy Meister, VSTO/Word MVP
    Thursday, April 7, 2011 7:05 AM
    Moderator
  • Cindy,

     

    thanks for your answer. i already managed to mimic that function using Word/PowerPoint interop, exporting slide per slide as EMF and importing it to Word. its very slow but works.

    i've looked into Office Open XML SDK but found it much more difficult to use and much worse documented. while interop is slow as hell its at least easy to use.

    for example, i wasn't able to find a single source on how to extract a slide and import it to word using the Office Open XML SDK. nothing.

    also, given this is going to be a PowerPoint VSTO add-on, the user has to have office installed anyways.

    thanks,

    Tom

    Thursday, April 7, 2011 7:13 AM
  • Hi Tom,

    If you search the web for "george for powerpoint" you'll find an application that does this.

    Not tryng to sell you on anything!

     


    Regards
    Thursday, April 7, 2011 1:14 PM
  • thanks but i already have a working solution. i'll put it on codeplex any time soon.

    EDIT:

    http://createhandouts.codeplex.com/

    its very early in its life cycle and needs documentation and localization, but it works.

    Thursday, April 7, 2011 2:43 PM