三棵树

导航

word office

vb word 引用

Imports Microsoft.Office.Interop

 

Dim myDoc, WordApp As Object
WordApp = CreateObject("Word.Application")
myDoc = WordApp.Documents.Add()
' Dim amyDoc = myDoc.ActiveDocument

'' "c:\" +

'' MsgBox(filename)
' Dim objShape = myDoc.Shapes
myDoc.Shapes.AddPicture("C:/1.gif")
' Dim filename As String
Dim filename = "C:\ooodi.docx"
myDoc.SaveAs(filename)
WordApp.Quit()

WordApp = Nothing

 

posted on 2017-02-16 11:58  三棵树  阅读(124)  评论(0编辑  收藏  举报