在标题中插入图像时,Word 2016上显示错误

时间:2017-07-05 10:58:02

标签: vb.net word-2016

我有一个脚本,用附加信息填充word文档。其中一个是当前公司的徽标。我将此图像添加到文档中,如下所示:

imgPath = saveFileAsTempFile(oDoc,oFile,"Logotype")
If oFile.FileExists(imgPath) Then
    oExternDoc.Sections(1).headers(2).Range.InlineShapes.AddPicture(imgPath)
    Set tables = oExternDoc.Sections(1).Headers(2).Range.Tables
    If tables Is  Nothing Then
    Else
        Factor = (tables(1).Rows(1).Height - oExtApp.CentimetersToPoints(0.05)) / oExternDoc.Sections(1).headers(2).Range.InlineShapes(1).Height  * 100
    End If 
    oExternDoc.Sections(1).headers(2).Range.InlineShapes(1).ScaleHeight = Factor
    oExternDoc.Sections(1).headers(2).Range.InlineShapes(1).ScaleWidth = Factor
End If

我的问题:

标题中已有徽标,应该被覆盖。在Word 2010中,新插入的徽标被添加到旧徽标的顶部,因此只有上面的徽标可见,这是完全正常的。但是现在使用Word 2016,这两个徽标都会一个接一个地显示。 有没有办法像以前一样将插入的图像放在现有图像的顶部?

Word 2010: enter image description here

Word 2016: enter image description here

0 个答案:

没有答案