Adding an image into a docx

Jun 11, 2014 at 11:49 PM

I cannot get an image to display in a document. It just says "this image cannot currently be displayed" using the code:
    Header headerDefault = document.Headers.odd;
    var img = document.AddImage(imageStream);//(@"../../Content/img/DMS-headerimage.jpg");
    Picture headerImage = img.CreatePicture(100, 100);
    Paragraph headerParagraph = headerDefault.InsertParagraph("", false);
The code in your doc does not compile because of (no method takes 3 args):
    Picture pic1 = p.InsertPicture(img.Id, "Donkey", "Taken on Omey island");
Jun 12, 2014 at 8:56 AM
This might be the same issue that has been addressed here:
If that's true then it can either be solved by using AppendPicture in stead of InsertPicture, or by downloading the latest source code (if you are indeed using the dll and not the latest source code, that is).
Marked as answer by GarethReid on 6/12/2014 at 9:25 PM
Jun 13, 2014 at 4:25 AM
AppendPicture() works! Thanks heaps.