RS232 book cover

Centrum Outlook Express Centrum Outlook Express

OE PowerTool 4.5.5


Twój adres IP to: 18.224.64.226
Przeglądarka: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)

Jak automatycznie wydrukować wiele plików DOC?

   Kolejny kod stworzony przy okazji pytania zadanego na grupach: jak automatycznie wydrukować wiele plików DOC? Można w tym celu napisać proste makro dla MS Worda:

Sub PrintAllFirst()
   Dim myFile As String
   Dim strLooking As String
   strLooking = "C:\Documents and Settings\Grzegorz\Pulpit\word\"
   myFile = Dir$(strLooking & "*.doc")
   Do While myFile <> ""
      Debug.Print myFile
      Application.PrintOut FileName:=strLooking & myFile, _
      Range:=wdPrintRangeOfPages, Item:= _
      wdPrintDocumentContent, Copies:=1, Pages:="1", PageType:= _
      wdPrintAllPages
      myFile = Dir$
   Loop
End Sub