We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Can I copy and paste images from MS Office applications onto the Diagram?


Essential Diagram does not have pre-built support for interfacing with clipboard copy/paste from the MS Office applications. The Diagram copy/paste implementation is confined to 'Node' type drawing objects that are native to Essential Diagram. To copy/paste an image, the Clipboard's data object should be an instance of the Diagram.ClipboardNodeCollection type populated with a Diagram.BitmapNode or a Diagram.MetafileNode that wraps the image. Since .NET uses its own format that is not compatible with the EnhancedMetafile format, you will have to use reflection to achieve this feature of copying and pasting images from MS Office applications like Excel, PowerPoint, Word, or Visio.

The sample provided in this Knowledge Base article demonstrates how you can add support to your Essential Diagram application to allow copy/paste from MS Office.






Article ID: Published Date: Last Revised Date: Platform: Control:
180 04/30/2011 02/16/2018 WinForms Diagram
Did you find this information helpful?
JunJoy Feb 15, 2018


I use the code in vs2012 but it didn't work. When I copy symbol from visio2016, and here "IntPtr ptr = GetClipboardData(CF_ENHMETAFILE);" always return 0. Another article https://www.syncfusion.com/forums/71540/how-to-import-visio-stencils-to-symbol-palettes says visio version affect the convert code, does it affect copy too? I'm dying for help, thank you. 

JunJoy Feb 15, 2018


I try some new code from https://stackoverflow.com/questions/18602171/copy-enhanced-metafile-from-clipboard-and-save-it-as-an-image/29923975#29923975 and it seems work well. Maybe here is the reson if (OpenClipboard(IntPtr.Zero))

Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon