none
Own Powerpoint shape like objects RRS feed

  • Question

  • Hey,

    I just got inspired by some PowerPoint Addons with own shape like objects in the presentations, but don't find an approach to realize own ones.

    What I need to do:

    - create and position an new shape like object (for example a Star with 7 edges) by a button click in an own Ribbon

    - have a special and customized context menu when I select this object

    Maybe someone got point into the right direction on how to create such an object which is saved in a presentation slide and how to watch for events on them.

    And as last point. Which part of the API to use when I want to show an own special context menu on demand.

    The "many" documentation and examples I found so far didn't cover this.
    I currently code in C# but it's more an object model question and I can use examples in VB or anything else too.

    Thanks
    -Marko


    • Edited by okram2005 Wednesday, December 21, 2016 2:47 PM
    Wednesday, December 21, 2016 2:21 PM

All replies

  • Hi okram2005,

    can you tell me the name of the powerpoint addins you are talking about.

    so that I can try to look that and try to understand your requirement clearly.

    it is possible that addins using the third party libraries.

    powerpoint object model doesn't provide anything to create a custom shape.

    you can see the object model.

    Shape Object (PowerPoint)

    The other thing you can use the user interface of powerpoint application.

    in which in the format tab you will get the option for edit shapes.

    you can edit the shape then save it as an image and use it with other office applications.

    Combine shapes to create a custom shape

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, December 22, 2016 3:37 AM
    Moderator
  • Hi Deepak,

    Many thanks for your quick answer.

    I am aware of the shape object model and combining shapes. That is unfortunately too basic. I need to understand is how to use WinAPI or a way much closer to system programming creating such an object and overlaying it in PPT.

    There are many different such add-ins with different behaviours. But I found a video of one tool, that is the easiest to explain what I mean: Search "Process flow (think-cell tutorials)" on Youtube. (I'm still not allowed to insert links here...)

    What I am trying to do is different, however, "similar" in terms of behaviour.  So, if I could even replicate this "pentagon" object you see in the YouTube video it helps. Nothing in the core VSTO PowerPoint API" seems to offer any of that.  As you say, "custom shapes" are not even offered.
    These "objects" are not shapes. They are something the add-ins provides. When you hover within PPT over these objects the mouse behaviour is different than with shapes. Even hovering over them highlights the object. You can also right click on them and they have their own context menu. 
    However, if you save the document and send it to someone who does not have the add-in, these objects magically are converted to "normal PPT shapes" so the other users can see it.

    At the moment, I am just trying to do the following (which is similar to the video):

    1. Click on a button in the ribbon, and allow the user with a dragging motion of the mouse to include the object. Dragging longer will make the object bigger (similar to how we include normal shapes).

    2. Hovering over the object will highlight it.

    3. Right click on the object gets a custom context menu. 

    It can be super simple: Let's say when you include the object it is a circle. The context menu has two options "add" and "remove". And clicking the "add" menu will add corners to the object making it a polygon. So if you add more, you get a triangle. And if you then add again the object changes to a rectangle/square. And if you add again, it becomes a pentagram. The "remove" menu would reverse this. But just implementing something like that would be great.

    Thanks for your thoughts,
    -Marko

    Thursday, December 22, 2016 7:55 AM
  • Hi okram2005,

    if we see that video then we can know that powerpoint also have this type of shapes.

    you can see that if you want to apply each feature separately then it is available in powerpoint.

    we can create that type of shape. we can rotate it. we can copy it any put it in the sequence.

    so as I created this by user interface all the things we can do by code.

    you had mentioned that ,"It can be super simple"

    No, it's not. it will be very complex. you have to track each shape textbox and everything that you use.

    you have to maintain all the things by code.

    creating a Ribbon and Context menu is a easy. but the main thing is to develop a functionality that can perform like mentioned above.

    you can try to refer the powerpoint object model to perform each functionality individually then apply your logic to combine it and make it one feature.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Friday, December 23, 2016 5:41 AM
    Moderator
  • Hi Deepak,

    thanks again for your reply.

    Unfortunately you seem to have misunderstood.
    As I explained I want to be able to integrate objects that are NOT available in Powerpoint right now.

    The video was just an example. Search for "Think Cell - harvey ball" as another example.

    So once again the question: how do we integrate objects that are not "normal" shapes into the presentations. As you can see in videos these are really custom objects (polygons, diagrams, etc.)

    All with different design mouse over context menus.

    Clicking on these custom objects doesn't even trigger the Powerpoint "Selection Changed" events.

    Thanks for your help. I hope you have an idea.

    Regards
    -Marko

    Friday, December 23, 2016 9:46 AM
  • Hi okram2005,

    I see the video of "Think cell Harvey Ball". looks like below.

    still I  believe that Think Cell is using Powerpoint Shapes and it just giving the some extra functionality to manipulate the shapes. this shape is also available in powerpoint look in example below.

    other then powerpoint shapes. I don't have any information how to add those shapes to powerpoint to manipulate it.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, December 26, 2016 5:51 AM
    Moderator