Can you help me?
Can you help me?
Follow up:
I Read Yves' description in another post of the knuckle-headed way the xslt gets loaded/unloaded for every citation.
One possible work-around may be to strip out anything from the xslt that isn't "used" - skeletonize it - to make it quicker to load/unload and take less memory. I have no idea how to:-
1) establish the superset of elements are "in use" in my doc plus those that are required for a well-formed stylesheet
2) create a script to trim them out.
My vi days were long ago and I'm not aware there's an equivalent on the PC. I'm not a Perl or python person. Isn't it sad we're talking about computing from yesteryear to overcome Microsoft's shortcomings?
I'm using the nature style, any hints, suggestions would be appreciated since I am still dead in the water.
<citation_as_link>yes</citation_as_link>
into<citation_as_link>no</citation_as_link>
I believe I have diagnosed the cause of this problem - It appears to be __caused by Word's UNDO handling__.
Basically for every single citation update it seems to create an undo entry in the undo stack. In my case each one of these is between 8Mb and 14Mb (I'm guessing the difference relates to the number of times a source is cited in the document). So for 900+ sources, we are looking at an undo stack of 7 to 13 Gigs. Add in the application and document and we are talking about another 45Mb on top. I don't know if there's a finite addressable limit of a 32bit app, but it looks like what's happening is that as the "update citations and bibliography" proceeds, it just creates a HUGE UNDO STACK which eventually exceeds either some internal address limit or operating system limit or physical resources limit (in my case it gets to about 1.8Gb in RAM). Then it falls over. Since it falls over when Task Manager shows I still have plenty of memory left - I think it's an internal limit.
How did I come to this conclusion?
I've spent days researching. I previously tried switching off the autosave - no change.
I monitored the memory use by the process winword.exe while manually updating my citations one at a time. The app with a blank doc takes about 25Mb. Add in my doc and it rises to 45Mb. Edit the first citation - rises to 57Mb, edit next - 69Mb, and so on. I quickly get to 150 or 170Mb before I chicken-out, exit "manage sources," and save the doc. I verify sources.xml is also updated.
SAVE does NOT clear the undo stack - there's no change in memory before and after SAVE.
On the ribbon, the Undo button offers multiple instances of "select bibliography style" even after save.
In older versions of word you could turn off the UNDO function, but it appears from Word 2007 and up you can't. If anyone knows of a way to disable UNDO in Word, that should solve this issue.
On other fora I hear that there has been no significant change in Word 2010 or 2013 in this area.
It's a diagnosis but not a solution.
If that is really the cause, you could disable the undo stack before formatting the citations and bibliography.
See http://www.ehow.com/how_6909785_disable-undo-action-ms-word.html for information on how to disable the undo stack.
I saw that but it looks like all the macro is doing is disabling the undo button, ie switching off user access to undo. What we have here (if I'm right) is the update citations and bibliography triggering the undo "under the hood", with no user intervention. I can try the macro route as you suggest, but I'm skeptical that it actually will turn off the stack. I'll be happy if I'm wrong, and happier still if it solves this (otherwise insurmountable) issue.
in Excel and older versions of word you can set the number of undo levels. setting it to 0 (or 1, I can't remember) has the effect of switching it off. Unfortunately MS removed that for 2007 and up.
The best I have been able to find is not actually a solution:
Sub UndoLevels()
' UndoLevels Macro
ActiveDocument.UndoClear
End Sub
But that just clears the undo stack at the time it is run. I need to disable it indefinitely, until I switch it on again. [Looks like you can in excel ](http://msdn.microsoft.com/en-us/library/office/ms477952(v=office.12).aspx)but not word. the 'undoLevels' property and most others in that link are not recognized in word 2007.
... and the macro trick in that link - creating a macro in the same name as the Undo/ctrlZ command, also doesn't work in word 2007:
Sub EditUndo()
' EditUndo Macro
' Reverses the last action
MsgBox "This function has been temporarily disabled", 16
End Sub
In older versions of Word this macro re-purposes the undo command, and you get the regular undo back by deleting or renaming the macro. There are a bunch of complaints out there that it no longer worked when people upgraded to 2007. As far as I can it isn't re-enabled in 2010 or 2013.
I just saw that Visio has:-
applicaton.UndoEnabled = False
which would be perfect - but that isn't available in word.