ilsley_SIMS Posted July 9, 2015 Posted July 9, 2015 Hi, I have got the colossal task of printing out all our academic reports. I started churning out our Year 7 ones first, but it seems to take forever using the 'print' function in SIMS. It generates the reports first and then sends them to print... but, to me, it feels like a very drawn-out process. Is there a quicker way to getting the reports printed? It's my first time carrying out this process! Also, does anyone know how to specify which printer you want to print to via SIMS? Thanks in advance!
LosOjos Posted July 9, 2015 Posted July 9, 2015 Hi, I have got the colossal task of printing out all our academic reports. I started churning out our Year 7 ones first, but it seems to take forever using the 'print' function in SIMS. It generates the reports first and then sends them to print... but, to me, it feels like a very drawn-out process. Is there a quicker way to getting the reports printed? It's my first time carrying out this process! I export all mine to a folder overnight, then print them in the morning using this script (save with .vbs extension, drag folder containing reports on to script to print them all): '========================================================================== ' ' NAME: WordXMLPrint.vbs ' ' AUTHOR: Jim Williams ' DATE : 30/04/2007 ' ' COMMENT: Batch prints Word XML files. ' HOW TO USE: Drag a folder containing the XML files onto the script. '========================================================================== Option Explicit Dim Arg 'Script argument Dim FSO 'File System Object Dim oFol 'Folder object Dim oFil 'File object Dim oFils 'Files Dim myWord 'Word object Dim filePath 'Path to file (need for Word to open the file) 'Check arguments If WScript.Arguments.Length < 1 Then MsgBox "Drag a folder containing Word XML files onto this script", vbOKOnly, "Error!" WScript.Quit End If Set FSO = CreateObject("Scripting.FileSystemObject") Arg = WScript.Arguments(0) If FSO.FolderExists(Arg) = False Then MsgBox "Drag and drop a folder onto this script to print the contents." Set FSO = Nothing WScript.Quit End If Set myWord = CreateObject("Word.Application") myWord.Visible = True 'Get folder informaton Set oFol = FSO.GetFolder(Arg) Set oFils = oFol.Files For Each oFil in oFils '-- enumerate files in the folder using For/Each. Each oFil is a File object. If FSO.GetFileName(oFil) <> "IndRepBaseTemplate.dot" Then filePath = oFil myWord.Documents.Open filePath, False, True, False, , , False, , , 8, , True myWord.PrintOut False myWord.Documents.Close False End If Next myWord.Application.Quit False Set myWord = Nothing Set oFils = Nothing Set oFol = Nothing MsgBox "Complete!", vbOKOnly, "Printing done" Also, does anyone know how to specify which printer you want to print to via SIMS? Thanks in advance! It'll use whatever printer is currently set as default in Windows, plus the default settings associated with it.
ilsley_SIMS Posted July 9, 2015 Author Posted July 9, 2015 I export all mine to a folder overnight... Is this done via the 'Export' feature on the Individual Report screen?
LosOjos Posted July 9, 2015 Posted July 9, 2015 (edited) Is this done via the 'Export' feature on the Individual Report screen? Yes that's correct. They take just as long to run, but you can at least leave it unattended then print them quite quickly in the morning using that script. EDIT: for an example, one year group (approx 300 students) of full subject reports (page per subject) takes about 9 hours to run here EDIT2: sorry, lots of edits another way to cut down run time is to minimize the use of graphics in your reports and to make sure that any you do use have been compressed (select image, go to 'Format' toolbar and select 'Compress Pictures') Edited July 9, 2015 by LosOjos
ilsley_SIMS Posted July 9, 2015 Author Posted July 9, 2015 Yes that's correct. They take just as long to run, but you can at least leave it unattended then print them quite quickly in the morning using that script. Thanks. My only problem with that is I can't seem to get the full subject names merged to the reports, so I have had to create a template for every subject, and that means I have to run a set of reports for each subject before I move on to the next one!
LosOjos Posted July 9, 2015 Posted July 9, 2015 Thanks. My only problem with that is I can't seem to get the full subject names merged to the reports, so I have had to create a template for every subject, and that means I have to run a set of reports for each subject before I move on to the next one! I'm afraid I don't follow - why can't you use Report Sections to create a page/section for each subject?
ilsley_SIMS Posted July 9, 2015 Author Posted July 9, 2015 I'm afraid I don't follow - why can't you use Report Sections to create a page/section for each subject? I didn't think of it like that!!! Of course, that'd work perfectly! Sorry, that was a scatterbrained moment. It's rare.... promise! - - - Updated - - - And thanks once again!
ilsley_SIMS Posted July 9, 2015 Author Posted July 9, 2015 (edited) EDIT: Ignore this comment! Edited July 9, 2015 by ilsley_SIMS
tben2505 Posted November 19, 2015 Posted November 19, 2015 Great - this doesn't seem to work for WORD 2013, though - is this what you use it with? I wonder if anyone knows how to combine all the exported XML files into 1 XML file - this would allow for printing to be done easily, by merely opening the 1 xml file in WORD and then printing - and would make archiving a lot easier, too - say to PDF. Is it possible? Cheers Tom I export all mine to a folder overnight, then print them in the morning using this script (save with .vbs extension, drag folder containing reports on to script to print them all): '========================================================================== ' ' NAME: WordXMLPrint.vbs ' ' AUTHOR: Jim Williams ' DATE : 30/04/2007 ' ' COMMENT: Batch prints Word XML files. ' HOW TO USE: Drag a folder containing the XML files onto the script. '========================================================================== Option Explicit Dim Arg 'Script argument Dim FSO 'File System Object Dim oFol 'Folder object Dim oFil 'File object Dim oFils 'Files Dim myWord 'Word object Dim filePath 'Path to file (need for Word to open the file) 'Check arguments If WScript.Arguments.Length < 1 Then MsgBox "Drag a folder containing Word XML files onto this script", vbOKOnly, "Error!" WScript.Quit End If Set FSO = CreateObject("Scripting.FileSystemObject") Arg = WScript.Arguments(0) If FSO.FolderExists(Arg) = False Then MsgBox "Drag and drop a folder onto this script to print the contents." Set FSO = Nothing WScript.Quit End If Set myWord = CreateObject("Word.Application") myWord.Visible = True 'Get folder informaton Set oFol = FSO.GetFolder(Arg) Set oFils = oFol.Files For Each oFil in oFils '-- enumerate files in the folder using For/Each. Each oFil is a File object. If FSO.GetFileName(oFil) <> "IndRepBaseTemplate.dot" Then filePath = oFil myWord.Documents.Open filePath, False, True, False, , , False, , , 8, , True myWord.PrintOut False myWord.Documents.Close False End If Next myWord.Application.Quit False Set myWord = Nothing Set oFils = Nothing Set oFol = Nothing MsgBox "Complete!", vbOKOnly, "Printing done" It'll use whatever printer is currently set as default in Windows, plus the default settings associated with it.
tben2505 Posted November 19, 2015 Posted November 19, 2015 The script works if you click OK to the three error messages it displays for each file:
LosOjos Posted November 19, 2015 Posted November 19, 2015 I've not been upgraded to 2013 yet, but a quick Google suggests the issue is with Reading View. Two options; open Word, go in to Options and look for a checkbox labelled "Open e-mail attachments and other uneditable files in reading view" - uncheck it. Of, try this (untested) version of the script: Option Explicit Dim Arg 'Script argument Dim FSO 'File System Object Dim oFol 'Folder object Dim oFil 'File object Dim oFils 'Files Dim myWord 'Word object Dim filePath 'Path to file (need for Word to open the file) 'Check arguments If WScript.Arguments.Length < 1 Then MsgBox "Drag a folder containing Word XML files onto this script", vbOKOnly, "Error!" WScript.Quit End If Set FSO = CreateObject("Scripting.FileSystemObject") Arg = WScript.Arguments(0) If FSO.FolderExists(Arg) = False Then MsgBox "Drag and drop a folder onto this script to print the contents." Set FSO = Nothing WScript.Quit End If Set myWord = CreateObject("Word.Application") myWord.Visible = True 'Get folder informaton Set oFol = FSO.GetFolder(Arg) Set oFils = oFol.Files For Each oFil in oFils '-- enumerate files in the folder using For/Each. Each oFil is a File object. If FSO.GetFileName(oFil) <> "IndRepBaseTemplate.dot" Then filePath = oFil myWord.Documents.Open filePath, False, True, False, , , False, , , 8, , True myWord.ActiveWindow.View.ReadingLayout = False myWord.PrintOut False myWord.Documents.Close False End If Next myWord.Application.Quit False Set myWord = Nothing Set oFils = Nothing Set oFol = Nothing MsgBox "Complete!", vbOKOnly, "Printing done" 2
tben2505 Posted November 19, 2015 Posted November 19, 2015 "Open e-mail attachments and other uneditable files in reading view" - uncheck it. works!! Thanks
Schoolcomms Posted November 23, 2015 Posted November 23, 2015 If you are printing them all out to send them home, the other option is to just email them all to parents from Schoolcomms. It takes minutes to do the whole school. We do a 30day free trial so you can do it for real before you even buy it.
bobsmith Posted November 26, 2015 Posted November 26, 2015 @LosOjos I've got this working with your latest revised script, thanks! 2 further questions if you could: 1. can i specify the print order somehow? Ideally alphabetically by form group 2. can we run the original export with command reporter? rather than tying up our office PCs for hours (and having to avoid the automatic shutdown of client pcs at 5pm!)
tben2505 Posted November 26, 2015 Posted November 26, 2015 If you are printing them all out to send them home, the other option is to just email them all to parents from Schoolcomms. It takes minutes to do the whole school. We do a 30day free trial so you can do it for real before you even buy it. We have InTouch so can so the same in SIMS Cheers Tom
LosOjos Posted November 26, 2015 Posted November 26, 2015 @LosOjos I've got this working with your latest revised script, thanks! 2 further questions if you could: 1. can i specify the print order somehow? Ideally alphabetically by form group 2. can we run the original export with command reporter? rather than tying up our office PCs for hours (and having to avoid the automatic shutdown of client pcs at 5pm!) 1. The easiest way to achieve this (well, the way I do it at least!) is to export them already sorted like this from SIMS, then if you sort by 'Date Created' in explorer, you'll be able to see where each group starts/ends. Sort them in to folders, then run each folder through the script - it automatically does them alphabetically. An alternative is to use this version of the script, which should print by date created (untested, try a small subset first). Will still need you to order them in SIMS first, but cuts out the folder moving step: Option Explicit 'folder properties Const adDate = 7 Const adVarChar = 200 Dim Arg 'Script argument Dim FSO 'File System Object Dim oFol 'Folder object Dim oFil 'File object Dim oFils 'Files Dim myWord 'Word object Dim filePath 'Path to file (need for Word to open the file) 'Check arguments If WScript.Arguments.Length < 1 Then MsgBox "Drag a folder containing Word XML files onto this script", vbOKOnly, "Error!" WScript.Quit End If Set FSO = CreateObject("Scripting.FileSystemObject") Arg = WScript.Arguments(0) If FSO.FolderExists(Arg) = False Then MsgBox "Drag and drop a folder onto this script to print the contents." Set FSO = Nothing WScript.Quit End If 'Get folder information Set oFol = FSO.GetFolder(Arg) Set rsFolder = CreateObject("ADODB.Recordset") With rsFolder.Fields .Append "Path", adVarChar, 200 .Append "Name", adVarChar, 200 .Append "DateLastModified", adDate End With rsFolder.Open() Set oFils = oFol.Files For Each oFil in oFils rsFolder.AddNew rsFolder("Path") = oFil rsFolder("Name") = oFil.Name rsFolder("DateCreated") = oFil.DateCreated Next rsFolder.Sort = "DateCreated ASC" Set myWord = CreateObject("Word.Application") myWord.Visible = True rsFolder.MoveFirst() While Not rsFolder.EOF If rsFolder("Name").Value <> "IndRepBaseTemplate.dot" Then filePath = rsFolder("Path").Value myWord.Documents.Open filePath, False, True, False, , , False, , , 8, , True myWord.ActiveWindow.View.ReadingLayout = False myWord.PrintOut False myWord.Documents.Close False End If Wend myWord.Application.Quit False Set myWord = Nothing Set oFils = Nothing Set oFol = Nothing MsgBox "Complete!", vbOKOnly, "Printing done" The interesting bit here is the 'rsFolder' part, which creates a sortable recordset of the file details - that's what you'll want to play with to alter the sorting used (assuming it works of course!) 2. unfortunately not - I had to ask our IT team to exclude my PC from the automatic shutdown for this reason (I run them overnight)
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now