Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Global template suddenly causes serious error (Word 2002 SP-2)

    Hi. Many of our users log on to Citrix (on a Win 2000 server) and use Word. Just recently, they've started getting that "xxx caused a serious error last time Word was opened..." message. The message names one of our custom global templates, which has been running fine - and unchanged - for several months now.

    We use crogram filesmicrosoft officeoffice10startup for our Word startup folder.

    The global template contains a lot of code, toolbar modifications and macros. I tried the following:

    1. Replacing the template with a fresh version.
    2. Removing global variables from the code in the template
    3. Removing the Autoexec module from the template

    The references are all fine and the code debugs without errors. We use the same global template on our desktops and don't run into the problem.

    Has anyone experienced similar Word problems with Citrix? Any suggestions as to what to look at?

    I realize this posting is heavy on the VBA, but I'm posting here because it seems to be a general Word problem rather than a specific VBA problem.

    Any help would be greatly appreciated!

    Regards,

    Bob

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Global template suddenly causes serious error

    Are the users getting any error when shutting down? Are they closing Word using File>Exit or just shutting down Windows?

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error (Word 2002 SP-2)

    That type of problem is oft associated wit hpoorly written 3rd party macros or addins acting up.

    And sometimes the Normal template becomes corrupt. I've even seen this happen with a read-pnly Normal template!

  4. #4
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Global template suddenly causes serious error (Word 2002 SP-2)

    I suspect some users do get errors occasionally when closing Word. And I noticed one user had two instances of Word running, which of course is a royal invitation to macro corruption.

    We booted everyone off Citrix, and I replaced the Normal.dot and the troublesome global template, plus all other global templates. Same results - every time I opened Word, it told me there had been a problem with the global template last time I closed Word (even when there HADN'T been!). I chose to disable the template, closed Word, replaced the template, opened Word, enabled the template, and close Word without any problem. But next time I opened Word, I got the same error...

    This happened even after I removed the Autoexec code from the global template.

    Removing the template entirely prevents the error message, but this isn't a long-term solution. The template contains macros and toolbar customizations used throughout the firm.

    For the most part, our Citrix programs get the same updates as our desktop programs do, so I can't figure out why the template causes problems on Citrix but not on local desktops.

    I would be tearing my hair out by now if it was long enough!

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error

    Hi Bob:
    I'm not a VBA expert, & you've probably already checked this, but in reading your posts, you mention that you only get the error message when a particular global template is loaded. In addition to the AutoExec macro, do you have an AutoExit macro? Do you have any AutoExit macros? If so, does renaming it help?

    Have you deleted all the temp files on the network?

    By the way, are you providing a normal.dot on the network or letting users control their own normal.dot templates? I would think that everyone should have their own.

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error (Word 2002 SP-2)

    Such problems most often have nothing to do with your templates, rather they are caused by 3rd partty add-ins and templates not installed in the Startup directory.
    In some cases, they are caused by libraries used by particular projects. e.g., DLLs referenced.

    Also, the number of instances of Word running has nothing to do with corruption.
    Multiple instances of Word will cause problems if there are BUGS in macros, i.e., the macros themselves hace to keep track of what tey are doing, e.g., using the proper Word instance and proper document. Those issues are outright bugs in the macros, not corruption.

    My fearless f orecast is that the problem you are seeing is caused by the interaction of some app, be it Acrobat or auntie virus software ir Omni Page Pro or ,,,
    Removing the templates makes the problem go away because that is removing the references/links to one of those products.

    OPEN each global template and the Normal template and see what add-ins have put buttons on toolbars or added menu items.
    Go into the VBIDE and see what references are included in Tools | References.

    The last choice is that here is an actual bug in one of your own macros.

    If you can isokate the "apparent" cause to a single template, then you need only check the references and code in that template.

  7. #7
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Global template suddenly causes serious error (Word 2002 SP-2)

    Thank you both for your suggestions.

    Phil, the custom template that is involved doesn't have an AutoExit.

    We do use Payne Consulting Group's Forms Assistant, Numbering Assistant and MetadataAssistant packages. These all install global templates. The Forms Assistant startup template does have both an AutoExec and an AutoExit macro. Payne's code is proprietary, so I'm unable to rename or rem out any of the macros.

    Regarding Normal.dot, we provide it via the network, using the path crogram filesmicrosoft officetemplates. We also provide only one set of templates. The idea behind this was to simplify template maintenance. I've searched Microsoft's website as well as the Citrix website, but haven't found any best practices around Word and Citrix.

    Howard, on the Normal.dot corruption issue, I was thinking of Word 97. Opening two instances of Word 97 almost invariably resulted in Normal.dot corruption for us. I guess XP has resolved this problem...

    The only global templates I could open were the two we created in-house. They reference VBA, Microsoft 10, Office 10, Office 2.0 Forms, OLE Automation and MS Scripting Runtime. None of the references are broken. There's nothing else in our Startup folder except the Payne global templates.

    Incidentally, we're coming across more instances of users getting 'xxx caused an error...' where the message names another global template. I'm wondering if the problem isn't so much with the templates themselves as with what Word does when it crashes. If Word crashes - for whatever reason - it seems like it stays fixated on one of the global templates, maybe one that was running code during the crash. I'm questioning whether the template itself is at fault, or whether Word crashing on Citrix somehow 'taints' an innocent global template in the eyes of Word.

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error (Word 2002 SP-2)

    >Phil, the custom template that is involved doesn't have an AutoExit.

    The subject issue rarely has anything to do with whether one has Auto* macros in thine own templates. The problem is almost always the result of poorly written 3rd party macros/add-ins/DLLs. Call the preceding statement "HK's speech number 23", or "HK23" for ease of reference.

    >We do use Payne Consulting Group's Forms Assistant, Numbering Assistant and MetadataAssistant packages. These all install global templates. The Forms >Assistant startup template does have both an AutoExec and an AutoExit macro. Payne's code is proprietary, so I'm unable to rename or rem out any of the macros.

    More importantly, thou shalt not fool around with other's software as thou doesn't knowest the impact.

    >Regarding Normal.dot, we provide it via the network, using the path crogram filesmicrosoft officetemplates. We also provide only one set of templates. The idea >behind this was to simplify template maintenance. I've searched Microsoft's website as well as the Citrix website, but haven't found any best practices around Word >and Citrix.

    The BEST practices are not app dependent.

    >Howard, on the Normal.dot corruption issue, I was thinking of Word 97. Opening two instances of Word 97 almost invariably resulted in Normal.dot corruption for us. >I guess XP has resolved this problem...

    Templates do not get corrupted by themselves, it is sloppy macro code, etc. that does not know how to deal with templates. Nothing to do with the Word version.

    >The only global templates I could open were the two we created in-house. They reference VBA, Microsoft 10, Office 10, Office 2.0 Forms, OLE Automation and MS >Scripting Runtime. None of the references are broken. There's nothing else in our Startup folder except the Payne global templates.

    The startup directory is not the only place bad 3rd party code lies, could be in any global template, add-in or DLL that gets loaded.

    >Incidentally, we're coming across more instances of users getting 'xxx caused an error...' where the message names another global template. I'm wondering if the >problem isn't so much with the templates themselves as with what Word does when it crashes. If Word crashes - for whatever reason - it seems like it stays fixated >on one of the global templates, maybe one that was running code during the crash. I'm questioning whether the template itself is at fault, or whether Word crashing >on Citrix somehow 'taints' an innocent global template in the eyes of Word

    Unlikely to have anything to do with the named template. A 3rd party is screwing up. See HK23.

    For an example, see http://www.standards.com/index.html?...randWordMacros.

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error

    Hi Bob:
    See if the steps in <post#=197827>post 197827</post#> help you track down the problem.
    Cheers,

  10. #10
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Global template suddenly causes serious error

    Thank you both for the plentiful suggestions. I'll try what I can. The big problem, of course, is trying to get time alone on Citrix. For some reason, the Citrix users in my firm have a problem with that! <img src=/S/angel.gif border=0 alt=angel width=15 height=21>

  11. #11
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error

    Just one other suggestion, based on what you're telling me each session which is running Word is utilizing normal.dot from a shared folder. You may try by placing the user's normal.dot in their profile. You could add a copy procedure to overwrite that instance of normal.dot at login event. In my experience multiple instances of Word attempting to access normal.dot will corrupt that file. Also, what permissions level do your end-users have to the startup folder and the shared normal.dot folder (although permissions typically return a Runtime 76 error).

    HTH
    Karen

  12. #12
    New Lounger
    Join Date
    Oct 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error

    Afternoon

    1. how big is the normal.dot ? Answer: always make the Normal.dot small

    2. place all the code that was in the Normal.dot into another template

    3. Most important: this error always occurs at our office as we load up about 4171Mb of templates at Word startup accross the network.

    As you can see Template size has a large part to play.

    Answer: whenever this problem occurs just manually add that template via Tools/Template and add-ins etc etc

    Close and re-open Word

    Yes, you say, I don't have time and it is very frustrating.

    There is No other answer ! is my answer.

    If your templates are huge then make them DLL's, use the .NET framework.

    Do whatever it takes is the answer.

    No I don't believe that the template is corrupt when this error occurs I just believe it is due to slow network and the huge size of the files (in our case).

    Always compile the templates !!!! most people don't do this.

    use "Option Explicit" etc etc

    There are free tools out there that strip extra whitespace from VBA modules as they balloooon with each compilation.

    4. I agree totally that deleting the "~" is very important as word will try and load these temp files and will crash every time.

    Pete

  13. #13
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Global template suddenly causes serious error

    Karen,

    Thanks for the good suggestions. I'll double-check our user permissions. We've been considering putting a Normal.dot in each user's profile rather than having them share one.

    Bob

  14. #14
    Star Lounger
    Join Date
    Feb 2001
    Location
    San Francisco, California, USA
    Posts
    67
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Global template suddenly causes serious error

    Pete,

    Thanks for the suggestions. Here's our story:

    1. Our Normal.dot is small - only 42 Kb.

    2. There is no code in our Normal.dot.

    3. Our Word startup files total only about 1.2 Mb.

    Our templates aren't that large. We always compile them and export/import the code to remove all the accumulated spaces and junk.

    4. We delete our temp files pretty regularly.

    As for manually adding back the template each time via Tools/Templates and Add-Ins: Not a good solution for us. We have a lot of high-powered users who (understandably) don't want to take these extra steps each time they use Word.

    Regards,

    Bob

  15. #15
    New Lounger
    Join Date
    Oct 2004
    Location
    Sydney, New South Wales, Australia
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Global template suddenly causes serious error

    Morning,

    if on startup you are loading MULTIPLE templates totalling 1.2 Mb then the problem will occur because the code MIGHT loop to load say Template No 2 BEFORE it has ACTUALLY finished loading Template 1.

    This is what I believe to be the case in our routine.

    And thus you and I will both have to work out how to either determine when a template has finished loading or just place a timer in the code before we then load the next template.

    For example

    for i = 1 to intTemplateCount

    application.templates.add (i)
    'thus here the code continues to load the next template BUT due to the "network" Word has not really yet finished loading the previous template
    next i

    Try and place the good 'ol "DoEvents" - I always place several to yield to the Windows events.

    Hope that helps

    Pete

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •