Word VSTO - Filling a shape does not work in Word 2010 and Word 2013?

后端 未结 1 1473
庸人自扰
庸人自扰 2021-01-28 05:25

I use the following VB.NET (VSTO) code to add a shape in MS-Word,

Dim app As Word.Application = Globals.ThisAddIn.Application
Dim doc As Word.Document = app.Acti         


        
相关标签:
1条回答
  • 2021-01-28 05:50

    Instead of shape.Fill.UserPicture("C:\Newfolder\App1.jpg") try

        Word.Range range = shape1.TextFrame.TextRange;
        range.InlineShapes.AddPicture(@"C:\Newfolder\App1.jpg", false, true, Type.Missing);
    
    0 讨论(0)
提交回复
热议问题