LosOjos Posted June 21, 2012 Posted June 21, 2012 (edited) This is becoming the bane of my life at the moment... I have always had trouble getting my scripts to work properly on SIMS generated Word XML files and them throwing an error because the reference to IndRepBaseTemplate.dot has been lost, but it seems things have gotten much worse since the latest update and many of my previous workarounds no longer work. Today I've come across the worst yet though: after exporting a batch of reports last night, today I can't open a single one of them. Each time, Word locks up and eventually closes and upon re-opening tells me that IndRepBaseTemplate.dot caused a serious error. Any body else had this issue? Better yet, any body found a way to fix it? I'm using Word 2010 in Windows XP Pro. So far, I have tried (all worked before last SIMS update but no longer help): Putting a copy of IndRepBaseTemplate.dot in the same folder as the exported reports Writing a VBA routine to stop IndRepBaseTemplate being loaded when the document is opened Loading up an Individual Report in SIMS (which in turn puts a fresh copy of IndRepBaseTemplate in my temp folder) PS: can anybody from Capita explain why IndRepBaseTemplate is needed in an exported report? I understand that when editing a template it is needed to add the context menus for adding aspects etc., but it does nothing but cause grief in the final document - surely you can find a way of removing the reference upon export? Even opening up a report in Linked Documents it throws an error! Edited June 21, 2012 by LosOjos
vikpaw Posted June 23, 2012 Posted June 23, 2012 No solution sorry, but can't you find another way to dump out the data? How are you exporting it, command reporter? There must be other ways to dump the data that you can parse, or do you want the Word format? 1
LosOjos Posted June 25, 2012 Author Posted June 25, 2012 No solution sorry, but can't you find another way to dump out the data? How are you exporting it, command reporter? There must be other ways to dump the data that you can parse, or do you want the Word format? Hi Vik, the Word format is very useful as it gives us so much control over the layout (it's annual reports I'm working on). Of course, all Individual Reports really are are mail merges so I could write my own script to do it. The only problem with doing that is I currently have no way of uploading en masse to student's linked documents (I'm still trying to get that elusive BO documentation! ) The way it's going though, I'm seriously considering pulling all of our reporting out of SIMS and developing an in-house system. We'll still use Assessment Manager to gather the results from teachers, but I'm getting sick of battling with SIMS to get a format I'm happy with now. May be about time I took it in to my own hands...
vikpaw Posted June 25, 2012 Posted June 25, 2012 (edited) Sounds like a plan. Did you talk to @David_Grashoff about the BO docs? What is your script doing? I remember someone else asking about how to run code at generation time. If you can crack that nut it would be awesome. It might be worth talking to the company that has the link to sims from office / printers. It could be in their interest to utilise your tools and make a product out of it. It does single attachment, i can't see why doing them in bulk iterating through a group wouldn't be possible. So long as you used a common unique id like adno or the internal person_id EDIT http://www.cohesionsoftware.co.uk/contact.aspx speak to Tim, i'm sure he's on here or one of the company bods is. Edited June 25, 2012 by vikpaw add link 1
LosOjos Posted June 25, 2012 Author Posted June 25, 2012 Sounds like a plan. Did you talk to @David_Grashoff about the BO docs? What is your script doing? I remember someone else asking about how to run code at generation time. If you can crack that nut it would be awesome. It might be worth talking to the company that has the link to sims from office / printers. It could be in their interest to utilise your tools and make a product out of it. It does single attachment, i can't see why doing them in bulk iterating through a group wouldn't be possible. So long as you used a common unique id like adno or the internal person_id EDIT Cohesion - Contact Us speak to Tim, i'm sure he's on here or one of the company bods is. Cheers Vik. I had asked @David_Grashoff but the request has to come from our local support. I asked them, they said no problem, 6 months later here I still am... I really ought to chase it up again, it's just finding the time! The scripts I use are all very basic things; one script runs to check if students have an estimated grade in a row and deletes that row if not (this is due to the awkward way we deal with targets here which prevents the "delete rows with no results" option from working!). Another (now defunct) script would colour rows based on estimated grade compared to target (SIMS can now do this automatically thankfully). Another populates a cell on each report with an "attendance award" - each student is awarded based on their % attendance. They are all things that could be solved by creating and populating new aspects, but I'm trying to automate as much as humanly possible; it's the only way to stay on top of the mass of analysis that is expected top be done! The annoying thing is, there were working workarounds for this but since the last SIMS update, none of them work any more, and it's all down to IndRepBaseTemplate - a template that isn't even necessary in the reports once they've been produced! 2
vikpaw Posted June 25, 2012 Posted June 25, 2012 I'd be happy to test something if that helps. Did you just whack macros into the template? I tried messing around with autoexec() or whichever the function was, but never got it to work at run time unless i actually opened the file afterwards. i guess that's okay for viewing, but didn't work for direct printing.
LosOjos Posted June 25, 2012 Author Posted June 25, 2012 I'd be happy to test something if that helps. Did you just whack macros into the template? I tried messing around with autoexec() or whichever the function was, but never got it to work at run time unless i actually opened the file afterwards. i guess that's okay for viewing, but didn't work for direct printing. If you put your code inside the "Document_Open()" sub routine of the "ThisDocument" module when editing a template, it'll run every time, even when doing a direct print. The problem is, when you take the resulting DOC out of SIMS (either by export or automatic upload to DMS), then VBA will throw an error because the reference to IndRepBaseTemplate is missing (i.e. IndRepBaseTemplate no longer exists). The rror will be something ridiculously irrelevant, like telling you that a module is missing on some core VBA function. The best fix I found was to use this code to automatically remove any broken references at run time, it worked great before the update Dim vbProj As VBProject ' This refers to your VBA project. Dim chkRef As Reference ' A reference. ' Refer to the activedocument's VBA project. Set vbProj = ActiveDocument.VBProject ' Check through the selected references in the References dialog box. For Each chkRef In vbProj.References ' If the reference is broken remove it If chkRef.IsBroken Then vbProj.References.Remove chkRef Next
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