1
votes

I am new to VSTO and C# and have a question regarding split buttons. I am trying to create a split button "Insert Slide" Much like the default Microsoft Created button "New Slide".

If someone clicks on the button, it inserts a blank slide with my custom template (this part works fine for me). If I click the drop down, I want to see several categories (ex: Slide Group A, Slide Group B, etc). In each of those categories will be a series of slides (Slide Group A has a bunch of different slide templates). I had some pictures created for how it would like to look but I can't post pictures yet, so I will do my best to describe them. If you refer to the New Slide dropdown, I would like it to look like that.

I would like to dynamically build the menu such that all the group names are created based on the folder names in a specified directory, and so that the slides to insert are pulled from within that particular folder. TIf you refer to the New Slide dropdown, there would be headers (like "Office THeme" but with my folder names instead) and then a series of slides underneath which are all the slides within tha folder.

If someone could point me in the right direction as to what I would have to do to make this work (I don't need you to write out the code for me; if you could just give me a high level sense of what I would need to do to implement this) I would appreciate it. Also if you could recommend a VSTO resource for Powerpoint, that would be great (I have been looking all over and have found resources for everything but Powerpoint!). Please let me know if this is unclear; I can provide the mock up pictures via email in case.

Thanks, Dan

1

1 Answers

2
votes

You can use gallery controls instead of split buttons. This control has callbacks like getItemImage, getItemLabel, GetItemCount which would help you to build your menu dynamically.

Here is an example I found which is using Excel 2007, you could follow this for PowerPoint