Add a Picture to a Microsoft Word Document
时间:2021-07-01 10:21:17
帮助过:6人阅读
Demonstration script that adds a picture (C:\Scripts\Logo.jog) to
a Microsoft Word document
代码如下:
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objShape = objDoc.Shapes
objShape.AddPicture("C:\Scripts\Logo.jpg")