home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast.iso / pcmag / vol10n20.zip / PRINTALT < prev    next >
Text File  |  1991-10-18  |  955b  |  35 lines

  1.  
  2. 'PrintAltPages:  Macro to print alternate pages of a document
  3.  
  4. Sub Main                           
  5.  
  6. On Error Goto Quit                 
  7. 'Trap errors and cancel print
  8.  
  9. Dim dlg As FilePrint               
  10. 'Use record structure FilePrint
  11. GetCurValues dlg                   
  12. 'Retrieve current document values
  13. Dialog dlg                         
  14. 'Get values as defined
  15.  
  16. For curpage = Val(dlg.From) To Val(dlg.To) Step 2
  17. 'Determine alternate pages beginning with page specified
  18.  
  19.     pg$ = Str$(curpage)         
  20. 'Page number to pass to FilePrint;          
  21. 'Send each page off to printer or queue
  22.  
  23.     FilePrint dlg.Type, dlg.NumCopies, dlg.Range, \
  24.     pg$, pg$, dlg.Reverse, dlg.Draft, dlg.UpdateFields, \
  25.     dlg.PaperFeed, dlg.Summary, dlg.Annotations, \
  26.     dlg.ShowHidden, dlg.ShowCodes, dlg.FileName
  27. 'Access all typical print options inprint dialog box
  28.  
  29. Next                               
  30. 'Go to next page to print
  31.  
  32. Quit: End Sub
  33.  
  34.  
  35.