VBA/Excel/Access/Word/Word/Word Document Print

Материал из VB Эксперт
Версия от 12:48, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

print a document with all the default print settings

 
Sub main()
    Dim wdApp As Word.Application
    Set wdApp = GetObject(, "Word.Application")
    wdApp.ActiveDocument.PrintOut
End Sub



setting the Range and Pages arguments of the PrintOut method

 
Sub Main()
    Dim wdApp As Word.Application
    Set wdApp = GetObject(, "Word.Application")
    wdApp.ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Pages:="2"
End Sub