Thanks for the reply Mr.Nagarajan.
What I have is Syncfusion Essential Studio 6.2.0.40, Is it possible to use DocIo with this suite?
>Hi Punith ,
Thanks for your interest in Syncfusion products. Our Essential Diagram allows you to export the diagram to the Word document. You have to save the diagram in metafile format and you can export this image to the word document using our Essential DocIo. Please refer to the following code snippet.
System.Drawing.Image diagramimage = new Bitmap(1, 1, PixelFormat.Format24bppRgb);
Graphics grfx = Graphics.FromImage(diagramimage);
IntPtr hdc = grfx.GetHdc();
Metafile emf = new Metafile(hdc, EmfType.EmfOnly);
Graphics emfgrfx = Graphics.FromImage(emf);
this.diagram.View.ExportDiagramToGraphics(emfgrfx);
grfx.ReleaseHdc(hdc);
grfx.Dispose();
emfgrfx.Dispose();
diagramimage.Dispose();
WordDocument document = new WordDocument();
//Adding a new section to the document.
IWSection section = document.AddSection();
//Adding a paragraph to the section
IWParagraph paragraph = section.AddParagraph();
WPicture mImage = (WPicture)paragraph.AppendPicture(emf);
document.Save("Sample.doc", Syncfusion.DocIO.FormatType.Doc);
System.Diagnostics.Process.Start("Sample.doc");
Please refer to the attached sample that demonstrates this completely.
http://www.syncfusion.com/Product/uploads/ExportToWord_ea8f81ee.zipPlease let me know if this helps.
Regards,