none
Openxml SDK : How to add an image in an Activex control (Microsoft Forms 2.0 Frame) in powerpoint. RRS feed

  • Question

  • Hi,

    How to add an image in a Frame control with scroll bars using openxml sdk?

    I manually created a PPTX file with a frame, added an image in it and scrollbar properties set for the frame. I used OpenXML SDK Productivity Tool to generate the code for this powerpoint file which worked fine for static images. The binary data for the embeddedControlPersistencePart and imagepart are stored in literals in base64 format and they will change for any other image file.

    I need to add any image in the control. Please help on this.

    Thanks,

    Shrivathsan


    • Edited by Shrivathsan Wednesday, November 8, 2017 2:26 PM
    Wednesday, November 8, 2017 2:10 PM

All replies

  • Hi Shrivathsan,

    you said that ,"they will change for any other image file.I need to add any image in the control"

    so are you not able to add any other image because the image in the code is converted in to base64 format.

    can you post the code.

    we will try to make a test with the code and if possible then we will try to provide you a solution for 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.

    Thursday, November 9, 2017 9:05 AM
    Moderator
  • Hi,

    I am sorry if the statement was not clear.

    My objective is to create a frame and load an image in it so that large images can be scrolled and viewed. I am creating a method which will accept any image file and return a ppt in which the image will be loaded into a frame.

    For this,  i manually created 2 ppt files with frames and different images. I generated code for these files using openxml productivity tool The difference in these files are the base64 string literals for the embeddedControlPersistencePart and the imagepart. I am not sure how the string was constructed.

    Hope my objective is clear. Please let me know for any other better options as well.

    Thanks,

    Shrivathsan

    Thursday, November 9, 2017 2:33 PM
  • Hi Shrivathsan,

    you had mentioned that when you compare the files, "The difference in these files are the base64 string literals for the embeddedControlPersistencePart and the imagepart. I am not sure how the string was constructed."

    there is no any documentation is available on that.

    it is created by it's internal on which we don't have any control.

    I suggest you to use Image control and use the "Picture size mode" to display the image properly.

    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, November 10, 2017 6:55 AM
    Moderator
  • Hi Deepak,

    Thanks for your response. I am trying to use macros to accomplish and it is out of scope for Openxml. I will post the approach if it comes good.

    Regards,

    Shrivathsan

    Friday, November 10, 2017 8:43 AM