Function p()
Dim w As New Word.Application
w.Visible = False
w.ChangeFileOpenDirectory "D:\"
w.Documents.Open filename:="2.rtf", ConfirmConversions:=False, ReadOnly:=True, AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", WritePasswordTemplate:="", Format:=wdOpenFormatAuto, XMLTransform:=""
w.ActiveDocument.PrintOut
w.ActiveWindow.Close
w.Quit
End Function
|