VBA/Excel/Access/Word/Word/Word Document Print — различия между версиями

Материал из VB Эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Текущая версия на 12:48, 26 мая 2010

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