工程->引用->Micorosoft Word 9.0 Object Library (后面为版本号)Option ExplicitDim wdApp As New Word.ApplicationPrivate Sub Command1_Click() wdApp.Documents.Add wdApp.Selection.InlineShapes.AddPicture FileName:= _ "D:\My Documents\My Pictures\0002.jpg", LinkToFile:=False, _ SaveWithDocument:=True wdApp.Visible = True End SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) Set wdApp = Nothing End Sub
wdApp.Documents.Add
wdApp.Selection.InlineShapes.AddPicture FileName:= _
"D:\My Documents\My Pictures\0002.jpg", LinkToFile:=False, _
SaveWithDocument:=True
wdApp.Visible = True
End SubPrivate Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Set wdApp = Nothing
End Sub