1

I have an issue when trying to print over 1000 microsoft word 2010 documents.

I have been given these files and they are all in the same folder, i have a macro that will print them all, however i have now been told that the documents need to be printed in reverse order. As they are duplex, the printers are printing them duplex 5-4, 3-2, 1 and i need to print them 5, 4-3, 2-1. I have been told the only way i can do this is if i insert a blank page at the end of each document. I obviously don't want to do this manually.

Can someone help me with this, Need help.

Thanks

pnuts
  • 54,806
  • 9
  • 74
  • 122
user2446846
  • 49
  • 1
  • 5

1 Answers1

0

NOT TESTED

Create this file in the directory with the documents and save it as a .bat (this is a hybrid bat/vbscript file ) .And then call it:

:sub echo(str) :end sub
echo off

:::''' batch part ''':::

'>nul 2>&1|| copy /Y %windir%\System32\doskey.exe '.exe >nul

'& echo/ 



'& tskkill winword  >nul 2>&1
'& for %%f in (*.doc *.docx) do cscript /nologo /E:vbscript %~dpfnx0 "%%~dpfnxf" 
'& del '.exe" & exit /b

''' end of batch part '''
Const wdPageBreak = 7 

Set WordApp = CreateObject("Word.Application")
WordApp.Visible = FALSE

'Open the doc
Set objWord = WordApp.Documents.Open(WScript.Arguments.Item(0))

Set objSelection = WordApp.Selection
objSelection.InsertBreak(wdPageBreak)
objSelection.TypeText ""

WordDoc.Close()
WScript.Quit

Sources of wisdom:

http://technet.microsoft.com/en-us/library/ee692875.aspx

http://technet.microsoft.com/en-us/library/ee692855.aspx

Community
  • 1
  • 1
npocmaka
  • 51,748
  • 17
  • 123
  • 166