Article View: comp.windows.ms
Article #14195WFW 2.0 Macro for printing odd/even pages.
From: RICHARD PAGE
Date: Tue, 28 Jan 1992 18:34
Date: Tue, 28 Jan 1992 18:34
64 lines
2851 bytes
2851 bytes
Here is a macro I put together to display a dialog box and prompt
for which pages to print and whether the document should be repag-
inated or saved first. It is based on a sample macro from James
Rudnicki from December. I would have had this out sooner, but
oh well... :^) To get this to work copy the text into an empty
macro edit page.
Richard M. Page
Systems Development Librarian
Doheny Memorial Library
RPAGE@VM.USC.EDU
*****CUT HERE********
Sub MAIN
Begin Dialog UserDialog 300, 154, "Odd/Even Printing"
Text 48, 8, 234, 48, "Print odd or even numbered pages. The document may
be repaginated and saved before printing."
GroupBox 11, 62, 143, 59, "Select Pages"
OptionGroup .OddEven
OptionButton 21, 78, 112, 16, "Odd Pages"
OptionButton 21, 95, 120, 16, "Even Pages"
CheckBox 173, 79, 116, 16, "Repaginate", .RePage
CheckBox 173, 96, 100, 16, "Save File", .SaveFile
OKButton 10, 127, 88, 21
CancelButton 110, 127, 88, 21
End Dialog
Dim dlg As DocumentStatistics
GetCurValues dlg
NUM = Val(dlg.Pages) 'Get number of pages
Dim NewDlg As UserDialog 'Declare dialog array
Choice = Dialog(NewDlg)
Select Case Choice
Case - 1 'OK Button
If NewDlg.RePage = 1 Then
ToolsRepaginateNow 'Make sure pagination is correct
End If
If NewDlg.SaveFile = 1 Then
FileSave 'Save before printing
End If
If NewDlg.OddEven = 0 Then
For cnt = 1 To NUM Step 2
FilePrint .Range = 3, .From = Str$(cnt), .To = Str$(cnt)
Next
Else
For cnt = 2 To NUM Step 2
FilePrint .Range = 3, .From = Str$(cnt), .To = Str$(cnt)
Next
End If
Case Else
End Select
End Sub
--
Richard Page, Systems Development Librn. | Voice: (213) 740-2939
Center for Scholarly Technology | BitNet RPAGE@USCVM
U. of So. Cal. Library, LA, CA 90089-0182 | InterNet RPAGE@VM.USC.EDU
Technical Details
Message-ID:
<kob8gqINNbkv@mizar.usc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!newsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1106e2,d490e6acdf51986b,start X-Google-Attributes: gid1106e2,public X-Google-Thread: 1054ae,d490e6acdf51986b,start X-Google-Attributes: gid1054ae,public X-Google-ArrivalTime: 1992-01-28 10:49:27 PST Path: arc1-ca.pugleaf.net!sparky!uunet!usc!news From: rpage@mizar.usc.edu (RICHARD PAGE) Newsgroups: comp.windows.ms,bit.listserv.win3-l Subject: WFW 2.0 Macro for printing odd/even pages. Followup-To: comp.windows.ms Date: 28 Jan 1992 10:34:02 -0800 Organization: University of Southern California, Los Angeles, CA Lines: 64 Sender: rpage@mizar.usc.edu (Richard M. Page) Message-ID: <kob8gqINNbkv@mizar.usc.edu> NNTP-Posting-Host: mizar.usc.edu Summary: WFW 2.0 Macro for printing odd/even pages. Keywords: WFW2 printing macro