Article View: comp.windows.ms
Article #14196Re: WFW 2.0 Macro for printing odd/even pages.
From: RICHARD PAGE
Date: Wed, 29 Jan 1992 20:54
Date: Wed, 29 Jan 1992 20:54
61 lines
3078 bytes
3078 bytes
A small fix was pointed out to me. I "pretty printed" the ASCII
text and I guess this might cause some confusion.
In article <kob8gqINNbkv@mizar.usc.edu> rpage@mizar.usc.edu (RICHARD PAGE) writes:
>
>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.
>
*****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."
'The line above must have no CR/LF split into two lines <*********** THE FIX
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:
<koe53vINN3lp@mizar.usc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!usc!newsReferences:
<kob8gqINNbkv@mizar.usc.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1054ae,d490e6acdf51986b X-Google-Attributes: gid1054ae,public X-Google-Thread: 1106e2,d490e6acdf51986b X-Google-Attributes: gid1106e2,public X-Google-ArrivalTime: 1992-01-29 13:01:00 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: Re: WFW 2.0 Macro for printing odd/even pages. Followup-To: comp.windows.ms Date: 29 Jan 1992 12:54:23 -0800 Organization: University of Southern California, Los Angeles, CA Lines: 61 Sender: rpage@mizar.usc.edu (Richard M. Page) Distribution: comp Message-ID: <koe53vINN3lp@mizar.usc.edu> References: <kob8gqINNbkv@mizar.usc.edu> NNTP-Posting-Host: mizar.usc.edu Summary: Small Fix for the macro... 8^) Keywords: WFW2 printing macro