i am having an issue trying to add images to a word document after the last image/word, trying to add a new page and adding the image to this would work as well.
this is the code i have so far for inserting the image.
Document aDoc;
object isVisible = false;
object readOnly = true;
wordApp.Visible = false;
aDoc = wordApp.Documents.Open(
ref filename, ref MISSING,
ref readOnly, ref MISSING, ref MISSING, ref MISSING,
ref MISSING, ref MISSING, ref MISSING, ref MISSING,
ref MISSING, ref isVisible, ref MISSING, ref MISSING,
ref MISSING, ref MISSING);
aDoc.Activate();
object range = aDoc.Content.End ;
aDoc.InlineShapes.AddPicture(@"C:\fullImagePath\Image.jpg", MISSING,MISSING, range)
i keep getting a type mismatch error
i also tried adding a new page but this deletes the data already existing on the word document adds a new page but adds the image on the 1st page.
aDoc.Content.InsertBreak(WdBreakType.wdPageBreak);
aDoc.InlineShapes.AddPicture(@"C:\fullImagePath\Image.jpg");
i am quite new to using Interop so i am a bit confused on how to do things