PDA

View Full Version : Booklet order printing



theta
07-16-2015, 08:46 AM
I have been researching (for what seems like an eternity) a way to generate a booklet from Word.

I read the http://word.mvps.org/FAQs/Formatting/BookletPrinting.htm articles on Booklet Printing. Whenever I used the macro it would open up OneNote, and I am not familiar with it.

The document is perfect, exactly how I want it to appear. Mirror margins, formatting, all good to go.

The method I used to use was printing on A4 (all pages) them using an A3 photocopier to keep duplexing until I ended up with pages 1,3,5 and 7 on sheet of portrait A4. I would then copy, for example, pages 4,2,8 and 6 onto a second sheet of portrait A4. When the two pages were then photocopied 2 sided > 1 sided, I would end up with a final sheet that I could cut down the middle horizontally and vertically - producing A6 sized inserts in the correct order 1,2,3,4,5,6,7,8.

I have found a way around this method - installing a PDF print spool (CutePDF Writer) and setting word to print 4 pages per sheet with scaling to A4. In the Page range : Pages input box I would normally type 1,3,5,7,4,2,8,6 to get the desired output.

My document has now ballooned to 33 pages and so I was hoping to get a macro to generate this number sequence for me as I cannot type it out every time / the chance of human error is too great.

If the macro could count the total number of pages, generate the sequence and input it into the print dialog then the entire solution would be complete, and I'd be able to upload it for use by everybody.

(I was playing with a formula in Excel, but that was just for fun. Column A contains number 1,2,3,4,5 etc =IF(ISODD(A3),A3,IF(MOD(A3,4)=2,A3+2,A3-2)))

theta
07-16-2015, 01:01 PM
Further from last. For a 33 page document, the print order would be this :



1,3,5,7,4,2,8,6,9,11,13,15,12,10,16,14,17,19,21,23,20,18,24,22,25,27,29,31, 28,26,32,30,33

Producing a single A4 page containing :

1...3
......
5...7

Followed by another A4 page containing :

4...2
......
8...6

When copied using single sided to double sided, the resultant single page can be cut into 4 with perfect page numbering for a booklet.

Paul_Hossler
07-16-2015, 08:09 PM
Not sure about the actual production, but MS Word (2010 at least) can save as a PDF

If you saved it in PDF you can use Adobe Reader's booklet printing options

I've always had pretty good luck doing it that way

You might have to adjust your document a little

theta
07-17-2015, 03:10 AM
The issue is - I don't actually want to print it. I wan't to create a PDF that I can distribute to an end user who can simply print it, then do the 1 sided to 2 sided photocopying. This requires me to produce a single PDF with pages in montage in the correct order.

It is just the number sequence I am stuck on, hoping a macro could help?

Paul_Hossler
07-17-2015, 08:07 AM
Try to use Adobe Reader's [Print] in Booklet Mode to print to CutePDF and see if that works for you

theta
07-17-2015, 09:44 AM
Try to use Adobe Reader's [Print] in Booklet Mode to print to CutePDF and see if that works for you

That is a step further than I was hoping to go. Effectively, I want to be able to click "Export doc as booklet".

I have the pdf print spool connected and working, so just need a code to generate the correct page sequence. In Pseudocode it's simple :

Generate 4 odd numbers, in correct order
Generate 4 even numbers, switching the pairs

Continue the sequence - effectively jumping 8 in the sequence, starting at 1 (add 4 odd) (add 4 even), next sequence starts at 9.

Doug Robbins
07-20-2015, 12:26 AM
The following code will generate a string containing the numbers of the pages in the required order and print out the document:


Dim i As Long
Dim strpages As String
Dim numpages As Long
numpages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
For i = 1 To numpages Step 8
strpages = strpages & "," & i & "," & i + 2 & "," & i + 4 & "," & i + 6 & "," & i + 3 & "," & i + 1 & "," & i + 7 & "," & i + 5
Next I
strpages = Mid(strpages, 2)
ActiveDocument.PrintOut Range:=wdPrintRangeofPages, Pages:=strpages

If the length of strpages exceeds 255 characters, it will be necessary to split it into two and then do the print in two parts

theta
07-22-2015, 03:01 PM
The following code will generate a string containing the numbers of the pages in the required order and print out the document:


Dim i As Long
Dim strpages As String
Dim numpages As Long
numpages = ActiveDocument.BuiltInDocumentProperties(wdPropertyPages)
For i = 1 To numpages Step 8
strpages = strpages & "," & i & "," & i + 2 & "," & i + 4 & "," & i + 6 & "," & i + 3 & "," & i + 1 & "," & i + 7 & "," & i + 5
Next I
strpages = Mid(strpages, 2)
ActiveDocument.PrintOut Range:=wdPrintRangeofPages, Pages:=strpages

If the length of strpages exceeds 255 characters, it will be necessary to split it into two and then do the print in two parts

Awesome, thank you very much! I was thinking of using MOD 4 (being pages per page) and then applying rules based on a count (i) to apply treatment. This is much simpler and clearer.

I'll test and get back to you.

theta
07-24-2015, 02:07 AM
I have produced a script that runs a sequence. Any thoughts on improving the efficiency or changing the approach?



Function strBookletOrder()


Dim i As Integer
Dim neg As Integer
Dim pos As Integer


last = 33 'Temp last page


i = 1 'Start counter
neg = 1 'neg aggreator
pos = 2 'pos aggregator


Do
If ((i - 1) Mod 4) Mod 2 = 0 Then
'Odd sequence
For neg = neg To (neg + 6) Step 2
Debug.Print neg
If neg = last Then Exit Do
Next neg
Else
'Even sequence
For pos = pos To (pos + 6) Step 2
If pos Mod 4 Then
Debug.Print pos + 2
Else
Debug.Print pos - 2
End If
If pos = last Then Exit Do
Next pos
End If
i = i + 1
Loop


End Function