Insert image inside an existing table in a word document

0

I have hundreds of documents and need to add a logo inside an existing table. I'm using spire.doc, does anyone have a light to give me?

        Console.WriteLine("Digite o nome: ");
        String nome = Console.ReadLine();
        //Console.WriteLine("\nDigite o caminho do logo:");
        //String logo1 = Console.ReadLine();
        String logo1 = "C:\ss";
        Section s = document.AddSection();
        Paragraph p = s.AddParagraph();

        Image image = Image.FromFile(@"" + logo1 + ".jpg");
        DocPicture picture1 = document.Sections[0].Paragraphs[0].AppendPicture(image); picture1.VerticalAlignment = ShapeVerticalAlignment.Top;
        picture1.HorizontalAlignment = ShapeHorizontalAlignment.Left;
        picture1.TextWrappingStyle = TextWrappingStyle.Square;

        Spire.Doc.Section section = document.AddSection();
        document.Replace("<nome>", nome, false, true);
        document.SaveToFile(@"C:\testes\Replace.doc", FileFormat.Doc);
        Console.WriteLine("\nArquivo criado com sucesso\n");
    
asked by anonymous 30.01.2015 / 19:40

0 answers