Примерно так должно работать:
public class WordGenerator : IDocumentGenerator
{
FileStream IDocumentGenerator.GenerateDocument()
{
object missing = System.Reflection.Missing.Value;
Document adoc = new Document();
adoc.InlineShapes.AddPicture(@"http://localhost:2014/Resources/MG.PNG", ref missing, ref missing, ref missing);
// save the doc file
object fileName = Path.GetTempFileName();
adoc.SaveAs(ref fileName, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
// quit word and release COM objects
object saveChanges = WdSaveOptions.wdDoNotSaveChanges;
adoc.Application.Quit(ref saveChanges, ref missing, ref missing);
Marshal.ReleaseComObject(adoc);
// return the stream
return new FileStream((string)fileName, FileMode.Open);
}
}
и вам придется удалить временный файл в будущем.