home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / mswindo / apps / 5049 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.4 KB  |  45 lines

  1. Newsgroups: comp.os.ms-windows.apps
  2. Path: sparky!uunet!kithrup!stanford.edu!ames!saimiri.primate.wisc.edu!zaphod.mps.ohio-state.edu!usc!rpi!psinntp!psinntp!panix!rryan
  3. From: rryan@panix.com (Rob Ryan)
  4. Subject: Re: Even and odd
  5. Message-ID: <1992Nov17.161236.8694@panix.com>
  6. Date: Tue, 17 Nov 1992 16:12:36 GMT
  7. References: <per.ytterberg.48.0@neurofys.uu.se>
  8. Organization: Panix, NYC
  9. Lines: 34
  10.  
  11. In <per.ytterberg.48.0@neurofys.uu.se> per.ytterberg@neurofys.uu.se (Per Ytterberg) writes:
  12.  
  13. >This has been asked before, I know that, but where can I find a macro to 
  14. >print even and odd pages in Word for Windows 2.0?
  15.  
  16. Something like this should do it:
  17.  
  18. Sub MAIN
  19.     Dim dlg As DocumentStatistics
  20.     ToolsRepaginateNow
  21.     GetCurValues dlg
  22.     n = Val(dlg.Pages)
  23.     If n < 1 Then End
  24.     For i = 1 To n Step 2
  25.         FilePrint .Range = 3, .From = Str$(i), .To = Str$(i)
  26.     Next
  27.     If(n Mod 2 = 1) Then
  28.         msg$ = "Put all the pages except the last one"
  29.     Else
  30.         msg$ = "Put all the pages"
  31.     End If
  32.     msg$ = msg$ + " back into the printer and press Ok when ready to print."
  33.     If(MsgBox(msg$, "Printing Even Pages", 49) = - 1) Then
  34.         For i = 2 To n Step 2
  35.             FilePrint .Range = 3, .From = Str$(i), .To = Str$(i)
  36.         Next
  37.     End If
  38. End Sub
  39.  
  40. -- 
  41.  Rob Ryan
  42.     Internet:   rryan@panix.com or Robert_Ryan@brown.edu
  43.     Bitnet:     ROBR@BROWNVM
  44.     Compu$erve: 70324.227@compuserve.com
  45.