To save paper sheets, I want to print contracts in brochure mode, i.e. 2 pages on the album sheet. But since there are only 4 pages, then it will be correct to print one side (external pages) - 4 and 1, and the second side 2 and 3. Accordingly, adding them in half, I will get an ideal brochure and save 3 sheets of paper. And if the document has 100 sheets, then it is necessary:

  1. Printing of internal pages: 2,3, 6,7, 10,11, etc. up to 98.99.

  2. Print external pages: 4.1, 8.5, 12.9, etc. to 100.97.

This can all be done manually, but for a PC operator (granny of retirement age) this is almost the highest mathematics. I am not familiar with macros and VBA, but I know for sure that this is possible to implement. Maybe someone already has an implementation of this feature, an add-in for Word. Please, help.

  • Print to pdf, and from there a brochure. - Qwertiy
  • Can you do it manually? The fact is that what you want to accomplish is called a “run-down”. You can do this in Word ( idlazur.ru/art57.php ). Accordingly, it is possible and in VBA - Sublihim
  • it is necessary to press a button and it itself distributed what and how it was printed. No additional action. With such success, I can choose right in Word 2 pages per sheet and Ctrl + C "4.1, 8.5, 12.9, etc. up to 100.97" and Ctrl + V, flip the sheets in the printer and Ctrl + C "4.1, 8.5, 12.9, etc. up to 100.97" + Ctrl + V in page numbers. - Vitali Fesyura
  • @VitaliyFesyura additionally, the printer must support duplex printing. - Sublihim
  • @ VitaliyFesyura. Those. what's the point. If you can do it manually (even without any copy-paste). Then you can write your actions in the Word macro. You will see code there. Next - a matter of technology. Well, and a little help on VBA. - Sublihim

1 answer 1

Thank you very much Sublihim for the comments. Now I give the answer to my question if anyone else is looking for an answer.

The most important thing. Make sure the number of pages in the document is even. If necessary, insert a blank page. You need to install a simple utility FinePrint. It puts a virtual printer driver and printing in the macro will be performed on this driver. This is all necessary for previewing what the macro will do. It may be necessary to slightly change the layout of the document for a normal view. All you need is to close the FinePrint window, change the document and run the macro again. Another FinePrint has the ability to print two-sided and smart settings wizard. This is actually the macro code itself:

Sub Спуск_полос_двухсторонняя_печать() ' ' Спуск_полос_двухсторонняя_печать Макрос ' 'задаю номер первой страницы nPageStart = 1 'количество листов в документе nPageFinish = ActiveDocument.ComputeStatistics(wdStatisticPages) For nCounter = nPageStart To nPageFinish / 2 sPageMin = Trim(Str(nCounter)) sPageMax = Trim(Str(nPageFinish - nCounter + 1)) 'если внешние страницы If nCounter Mod 2 > 0 Then sPagesPrint = sPageMax + "," + sPageMin Else 'если внутренние страницы sPagesPrint = sPageMin + "," + sPageMax End If 'постройка строки номеров страниц для печати If nCounter = 1 Then sListOfPages = sListOfPages + sPagesPrint Else sListOfPages = sListOfPages + "," + sPagesPrint End If Next 'параметры страницы, что бы все влезло 'мой совет. Сначала попробуйте без параметров страницы. 'Если не понравится, вот готовый код, только меняйте значения With Selection.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(1.2) .BottomMargin = CentimetersToPoints(1.2) .LeftMargin = CentimetersToPoints(1.2) .RightMargin = CentimetersToPoints(1.2) .Gutter = CentimetersToPoints(0) .HeaderDistance = CentimetersToPoints(1) .FooterDistance = CentimetersToPoints(1) .PageWidth = CentimetersToPoints(21) .PageHeight = CentimetersToPoints(29.7) .FirstPageTray = wdPrinterDefaultBin .OtherPagesTray = wdPrinterDefaultBin .SectionStart = wdSectionNewPage .OddAndEvenPagesHeaderFooter = False .DifferentFirstPageHeaderFooter = False .VerticalAlignment = wdAlignVerticalTop .SuppressEndnotes = False .MirrorMargins = True .TwoPagesOnOne = False .BookFoldPrinting = False .BookFoldRevPrinting = False .BookFoldPrintingSheets = 1 .GutterPos = wdGutterPosLeft End With 'настройки печати ActivePrinter = "FinePrint" Application.PrintOut , Range:=wdPrintRangeOfPages, Item:= _ wdPrintDocumentWithMarkup, Copies:=1, Pages:=sListOfPages _ , PageType:=wdPrintAllPages, _ Collate:=True, PrintToFile:=False, PrintZoomColumn:=2, _ PrintZoomRow:=1, PrintZoomPaperWidth:=0, PrintZoomPaperHeight:=0 End Sub