DEV Community

Oscar Sun(孫守真字任真)
Oscar Sun(孫守真字任真)

Posted on

Answer: C# Interop.Word insert image into paragraph

Try this first:

    private void WriteBookImage(int im)
    {
        paraTop = doc.Content.Paragraphs.Add(ref oMissing)
        if (im == 0)
        {
            //you should specify the range [where] to add inlineshpae
            //in this case, doc will be the [where] and the last InlineShape in the doc will be the exactly [where]
            //doc.InlineShapes.AddPicture(@"C:\Users\fred\source\repos\xxx\wwwroot\images\yyy.png");
            //in this case,

Top comments (0)