--
mports Microsoft.Office.Interop
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim wod_app As New Word.Application '這邊要注意建立app時要用new
Dim wod_doc As New Word.Document
wod_doc = wod_app.Documents.Open("c:\1.doc", , True)
wod_app.ActiveDocument.SaveAs("c:\" & i & ".doc")
' wod_app.Visible = True '預覽列印
wod_app.PrintOut(Copies:=1) '直接列印預設印表機
wod_app.Quit()
End Sub
沒有留言:
張貼留言