VSTO PowerPoint AddIn Deployment Issue RRS feed

  • Question

  • I just released Auto Style It o CodePlex (

    If you run the project from within visual studio, Start > Debug > Power Point launches, the Auto Style It User Control is docked in the Custom Pane on the right hand side.

    When you open a slide that contains bullets > Click the Auto Style button, the current slide is duplicated x number of times where x = the number of bullets (paragraphs) - 1 (minus 1 because the current slide already exists).

    Then each slide is highlighted:

    On the first slide, bullet 1 is highlighted the selected color and the remaining bullets are styled the normal color (grayed out or whatever color you choose).

    On the second slide the second bullet is highlighted, and so on.

    This all works correctly when launched from within Visual Studio.

    I have an installer package (Installshield for Visual Studio 2012 LE), I will upload it if anyone thinks they might be able to solve this issue.

    After I run PowerPoint in the deployed version, PowerPoint runs, PowerPoint docks the Auto Style It user control in the custom pane on the right hand side so it looks as though it installed correctly.

    I open the slide I want to style, click the Auto Style button, and nothing happens.

    I have tried special versions with Message Boxes and can't seem to debug why the deployed version would not be able to run.

    I have tried logging and it just seems the button event isn't hooked into PowerPoint when run from the installed version.

    I am going to make some more special versions, but it is difficult to debug something, the registry entries look correct and they must be or the control wouldn't load I would think.

    Any suggestions, or if you need for me to upload the installation project I can do that.

    This is driving me bonkers because it works when launched from Visual Studio.

    I read about Trust and applications and I thought being in Program Files would be enough but perhaps more is needed.

    Thanks, I am going outside for a couple of hours of fresh air after spending all weekend staring at my computer screen and pulling the last few hairs I have left out.


    Sunday, May 5, 2013 4:16 PM

All replies

  • most probably you are not storing in global variable object on which you attach your events to - it will Work in VS because GC does not collect unreferenced objects aggressively (so you can see out of scope objects in your debugging session) but in normal release mode it does.
    Monday, May 6, 2013 6:53 AM
  • Thank you for your reply; I will mark it as an answer once I know what it means and how to fix my problem.

    Can you tell me a little more about what this means:

    "not storing in global variable object on which you attach your events"

    I am not sure what to search for, can you find an article or suggest an example on how to attach events?

    I created a user control which is located in a separate project from the Addin project, and the user control is loaded when the AddIn starts (AutoStyleIt_StartUp event)

    Thank you for answering, I now know that I don't know something, so that is a step in the right direction.

    // create the control AutoStyleItControl autoStyleItControl = new AutoStyleItControl();

    // set the AutoStyleItHost autoStyleItControl.AutoStyleItHost = this; // add the custom task pane Microsoft.Office.Tools.CustomTaskPane autoStyleItTaskPane = this.CustomTaskPanes.Add(autoStyleItControl, "Auto Style It 1.0.0"); // Show the control autoStyleItTaskPane.Visible = true;


    Monday, May 6, 2013 9:52 AM
  • show us how you attach to autostyle button click event, since this is when nothing happens after installation, right?
    Monday, May 6, 2013 10:28 AM
  • Originally the button click was handled as part of the UserControl.InitializeComponent event.

    Per your suggestion I tried making the button public on the UserControl so I could do this:

    Again this works when Launched from within Visual Studio, after I install it, the control is launched but nothing happens.

    I will try putting in a message box or to see if I can log what is happening but I have to go to work now.

    Thank you for your help, it seems strange because the other buttons on the control (the color picker and the links to my websites) work s it isn't like the control is disabled.

    If you have some time the project is at . I will report back any finding when I get off work and have more time.

    Thanks again.

    // create the control
    this.AutoStyleItControl = new AutoStyleItControl();
    // set the AutoStyleItHost (not used in this test)
    // this.AutoStyleItControl.AutoStyleItHost = this;
    // add the custom task pane
    this.AutoStyleItTaskPane = this.CustomTaskPanes.Add(this.AutoStyleItControl, "Auto Style It 1.0.0");
    // Setup the Click event
    this.AutoStyleItControl.AutoStyleButton.Click += new System.EventHandler(this.AutoStyleButton_Click);
    // Show the control
    this.AutoStyleItTaskPane.Visible = true;


    Monday, May 6, 2013 2:56 PM