none
How to know the index of the just added smartart layout? RRS feed

  • Question

  • I've just created a smartart layout (.glox file), and I put it in folder: "...\AppData\Roaming\Microsoft\Templates\SmartArt Graphics\", so I can open my custom layout in PowerPoint.

    Now I want to open it from code, but I don't know its index, how can I open it?

    ----------------------------------------------------------------------------------------------

    PowerPoint.Slide slide = ppApp.ActiveWindow.Selection.SlideRange[1];

    PowerPoint.Shapes allShapes = slide.Shapes;

    allShapes.AddSmartArt(ppApp.SmartArtLayouts[myIndex], 0f, 0f, width, height);

    //- myIndex = ????

    ----------------------------------------------------------------------------------------------

    Thanks

    Note: I am using PowerPoint2013, VS Ultimate 2013, C#

            

    Monday, November 17, 2014 10:33 AM

Answers

  • I've solved my problem. Each smartart (or glox file) is identified by its id (a string) which is defined in the header layout file. So what I did is just call my smartart layout's id like

    allShapes.AddSmartArt(ppApp.SmartArtLayouts[smartartId], 0f, 0f, width, height);

    Sorry for the late response. Thanks for your help.


    • Marked as answer by chipbk11 Thursday, November 27, 2014 9:29 AM
    Thursday, November 27, 2014 9:29 AM
  • Hi Abdul Subhan:

    This forum handles requests related to Open Specifications documentation issues. The Open Specifications can be found at: http://msdn.microsoft.com/en-us/library/cc203350.aspx. Your question does not appear to be related to the Open Specifications documentation set.     

    I suggest you try the following forums to get assistance.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=officegeneral


    Regards, Obaid Farooqi

    Thursday, April 13, 2017 4:53 PM
    Owner

All replies

  • Hello chipbk11,

    Thank you for your question. A member of the protocol documentation team will respond to you soon.

    Best regards,
    Matt Weber | Microsoft Open Specifications Team

    Monday, November 17, 2014 4:42 PM
  • Hi chipbk11,

    I am the engineer who will be working with you on this issue. In order to better understand your question, please post or send the file as attachment to ‘dochelp (at) microsoft (dot) com’ and in the e-mail indicate that it is for me. Be sure that the file does not contain any confidential information. Please indicate which information you are looking for in the sample file.

    Regards,
    Vilmos Foltenyi - MSFT

    Monday, November 17, 2014 10:04 PM
  • Hi chipbk11,

    I haven’t heard from you, I haven’t got the glox file, what you are trying to process programmatically. Is your problem solved? Please let me know the status of your project.

    Thanks, Vilmos
    Thursday, November 27, 2014 7:43 AM
  • I've solved my problem. Each smartart (or glox file) is identified by its id (a string) which is defined in the header layout file. So what I did is just call my smartart layout's id like

    allShapes.AddSmartArt(ppApp.SmartArtLayouts[smartartId], 0f, 0f, width, height);

    Sorry for the late response. Thanks for your help.


    • Marked as answer by chipbk11 Thursday, November 27, 2014 9:29 AM
    Thursday, November 27, 2014 9:29 AM
  • from where did u get the smartartid?
    Thursday, April 13, 2017 11:38 AM
  • Hi Abdul Subhan:

    This forum handles requests related to Open Specifications documentation issues. The Open Specifications can be found at: http://msdn.microsoft.com/en-us/library/cc203350.aspx. Your question does not appear to be related to the Open Specifications documentation set.     

    I suggest you try the following forums to get assistance.

    https://social.msdn.microsoft.com/Forums/en-US/home?forum=officegeneral


    Regards, Obaid Farooqi

    Thursday, April 13, 2017 4:53 PM
    Owner