DimMyWordAsObject
DimNewDocAsObject
SetMyWord=CreateObject("Word.Application")"建立一個word物件
M=App.Path&"\123.doc"
SetNewDoc=MyWord.Documents.Open(M)
Clipboard.Clear"清除剪貼簿
Clipboard.SetDataPicture1.Picture"vbCFBitmap圖片框中圖片裝入剪貼簿
MyWord.Selection.TypeText"123"&"."&vbCr"換行
MyWord.Selection.Paste"將剪貼簿中的影象複製到Word文件中
MyWord.Selection.TypeText(vbCrLf)"換行
NewDoc.Content.InsertAfter"123"&"."&vbCr
SetNewDoc=Nothing
SetMyWord=Nothing"清除物件
DimMyWordAsObject
DimNewDocAsObject
SetMyWord=CreateObject("Word.Application")"建立一個word物件
M=App.Path&"\123.doc"
SetNewDoc=MyWord.Documents.Open(M)
Clipboard.Clear"清除剪貼簿
Clipboard.SetDataPicture1.Picture"vbCFBitmap圖片框中圖片裝入剪貼簿
MyWord.Selection.TypeText"123"&"."&vbCr"換行
MyWord.Selection.Paste"將剪貼簿中的影象複製到Word文件中
MyWord.Selection.TypeText(vbCrLf)"換行
NewDoc.Content.InsertAfter"123"&"."&vbCr
SetNewDoc=Nothing
SetMyWord=Nothing"清除物件