Home > Software engineering >  Vba consult
Vba consult

Time:11-15

Want to realize automatic duplex printing through macro, recording a macro as follows
Sub duplex printing ()
'
'duplex printing macro
'
'
Application. The PrintOut FileName:=", "Range:=wdPrintRangeOfPages, Item:=_
WdPrintDocumentWithMarkup, Copies:=1, Pages:="1, 2," PageType:=_
WdPrintAllPages, Collate:=True, the Background:=True, PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
Sometimes work sometimes doesn't work, and margins will automatically print out the opposite there is a problem, consult a great god solution,

CTRL + a and usual habits, F9 update all domain, want to in the control button to add this functionality, also recorded a macro
Selection. The WholeStory
ActiveDocument. Shapes. Range (Array (" Left Brace 14 ")). Select
ActiveDocument. Shapes. Range (Array (" Straight Connector 13 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" Text Box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" Text Box 1 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" Text Box 7 ")). Select
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
ActiveDocument. Shapes. Range (Array (" Text Box 8 ")). Select
Selection. Fields. The update
This macro run domain also didn't update, and select the reason why a lot in the middle, consult a great god to reassure

CodePudding user response:

You this is the right of macro recording?
Should have a loop to
Odd page
For I=1 to total number of pages step2
Print out the I, I
Even to 2 to total number of pages, pages step2

CodePudding user response:

reference 1/f, the magic of VBA response:
you recorded this macro right?
Should have a loop to
Odd page
For I=1 to total number of pages step2
Print out the I, I
To 2 to total number of pages, even page step2
I just need to automatic duplex printing designated a, b two pages, don't need to manually turn the that automatic printing, the printer is supported, but record ChengHong ran up
  •  Tags:  
  • VBA
  • Related