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

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

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

print a document with all the default print settings

   <source lang="vb">

Sub main()

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

End Sub

</source>
   
  


setting the Range and Pages arguments of the PrintOut method

   <source lang="vb">

Sub Main()

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

End Sub

</source>