I tried do like this Inserting Image into DocX using OpenXML and setting the size but I not found the reference of "new BitmapImage"
I'am using framework .NET 4.5 on Visual Studio 2013 in ASP.NET MVC Application
I tried do like this Inserting Image into DocX using OpenXML and setting the size but I not found the reference of "new BitmapImage"
I'am using framework .NET 4.5 on Visual Studio 2013 in ASP.NET MVC Application
Have a look at this : MSDN Basically you have to use this: Notice the ImagePartType
MainDocumentPart mainPart = wordprocessingDocument.MainDocumentPart;
ImagePart imagePart = mainPart.AddImagePart(ImagePartType.Jpeg);
using (FileStream stream = new FileStream(fileName, FileMode.Open))
{
imagePart.FeedData(stream);
}
AddImageToBody(wordprocessingDocument, mainPart.GetIdOfPart(imagePart));