欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  web前端

Add a Picture to a Microsoft Word Document_javascript技巧

程序员文章站 2022-06-10 23:07:30
...
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")