Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Opening templates

    A question: Is anyone else out there (Word97/97/2000

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

    Re: Opening templates

    Hi Chris:

    I only have one macros.dot template in my startup directory. I also notice a delay (Word2K) the first time I run a macro in a Word session. My delay is not as long (after glancing at your site, I'm sure I have far fewer macros), but it's still there.

    I should point out that I'm NOT a VBA expert, so others may be able to give more insight...I'm just letting you know my observations.

    Unless you need your utility templates almost all the time, then you could probably be better served by loading them as add-ins when needed. I don't know how long it takes you to load Word, but on my 600MH-Win98SE, it takes me about 4 seconds to load Word after a reboot and about 2 seconds after the first time (assuming no other running apps or resource drains); though that's with an empty document loading. [I can remember how fast I used to think Word 6 loaded on a 486SX with 4MB of ram). Having 8 utility templates plus normal.dot loading must take a bit of work.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening templates

    Hi Chris

    I don't think it is opening the templates that is the issue. It is probably opening the file which interprets VBA. My guess is that there are about 10 files (DLLs etc) some or all of which could be needed.

    If you are on NT you might look at the running processes before and after running the first macro and see what new ones appeared.

    As you say opening any macro might cause these files to open and stay open for the session. . . .or it might not.

    If you are not on NT it is more difficult to look at the running processes. There is a word macro which will do this for you, but that would not help would it?
    David Grugeon
    Brisbane Australia

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    > It is probably opening the file which interprets VBA

    I could test this fairly easily by removing all but one template from the Startup Directory, rebooting, and running a macro in that template, moving templates back, rebooting and running again.

    I'm on Win95 - the cheap upgarde CD!

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    OK here's the result of a CRUDE timing test. I'm 233MHz 2x20G drives (24 2G partitions) and 64MB RAM; Win95/Word97SR2 and my hard drives are pretty well defragmented.

    I moved all but my trusty Under054.dot (Under-The-Hood) template out of the Startup folder, rebooted, loaded Word and then ran the GlueReturns macro from the toolbar menu (Thanks Loungers!). Time taken 8 seconds by the sweep second hand of the office clock.

    I moved the seven other templates back to the Startup folder, rebooted, loaded Word and then ran the GlueReturns macro from the toolbar menu (Thanks Loungers!). Time taken 13 seconds by the sweep second hand of the office clock.


    A difference of 5 seconds for an additional 6 templates. It would be VERY unscientific of me to say that it takes about one second per extra template, except that I never throw anything away - I have many stale versions tucked away in my 000Spare folder, so guess what I did?

    That's right! I dragged 'em back into the Startup folder. All 247 of them, for a grand total of 255 templates in the Startup folder. I made a side bet with myself that Word97SR2 would choke at 127, checked my Home Insurance Policy, defragmented, reboooted, reloaded Word ....


    I'd overlooked the fact that each copy of the 255 templates has a toolbar. I watched in shrieking disbelief as my 1024x768 screen filled up with toolbars upon toolbars. (UnderTheHood has a macro to best-fit toolbars to the screen, but we'll save that for another day). Word barfed on a template Thing119.dot. The toolbars continued until only about an inch of document was visible (docked toolbars were pushing it down, floating toolbars just muddied the issue), and then this program had perfomed an illegal operation. I claimed my bet (a fresh-baked ginger-oatmeal cookie), deleted the 196 ~*.dot files from the Startup folder (so that's how many got opened?), dropped Startup to be 127 templates, defragged, and essayed again....

    Still gagged on Thing119.dot, so I figured it for a corrupt template and moved it out.

    127 templates 175 seconds. The Toolbar display is something ya gotta see!

    So, I sez, why not re-eesay with all templates sans Thing119.dot. Which I did. Word failed again at 196 templates.

    Anyway, my current estimate is of the oder of 1 second per template. While there may be overhead in installing the VB interpreter, it is probably fairly constant. When answering the question "Does number of templates affect initialization time?" the answer would seem to be "Reckon on one second per template in the Startup folder".

  6. #6
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening templates

    I stand corrected. Thankyou for your research which constitutes a significant advance in human knowledge.

    Are you going to try the do nothing autoexec macro and see if that preloads all the code so subsequent macros are quicker?
    David Grugeon
    Brisbane Australia

  7. #7
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    Chris,

    Does it make a difference in the timings when toolbars are removed? They could be a major part of the load time.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    OK You guys. Never satisfied. I have three columns to write for ComputerWorld due today. ("Greeve's Peeves" - why I'm not buying your product/services on the web). Once they are done I'll bend ny shoulder to shifting the load of human knowledge. Who knows how many other Word users can throw up (!) 256 templates with matching toolbars ....

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    OK.

    <pre>Sub AAA_removetoolbars()
    Dim cb As CommandBar
    For Each cb In CommandBars
    If cb.Visible Then
    cb.Visible = False
    End If
    Next cb
    end sub
    </pre>


    Traps for young players:
    ========================

    If you have 196 templates in your startup directory, DO NOT issue the command Tools, Macro, VisualBasicEditor if under the age of 35. There are more important things to do in life, such as starting a large family, than in waiting for the VBE interpreter to load and open all those templates and presumably tokenise them. I was 54 when I started, with a full head of hair. Eight minutes 33 seconds later ... If you fire up VBE after a no-Startup folder load of Word, but having opened all 196 templates, 23 seconds.


    If you DO elect to write a short macro like the one above, DO NOT play safe and issue a VBE command File, Save "just in case". Your Intel warranty will expire before anything untoward happens that you might possible care about more than waiting for the VBE to finish displaying all the project names in the header of the project Explorer window.

    BEFORE you elect to run above macro, DO take a screen snapshot of the toolbars (attached as a Paintbrush BMP and PKZipped as Toolbars.ZIP). You'll just have to trust me on this one, kids. While the display of the lights going out all over Europe, we shall not see them again in our time may sound like a prophecy of doom from September 1914, it holds true in February 2001. There's no way I'm going through this again, even if a mentor is from Brisbane, he said grudgeongly. If you do inspect the BMP I have circled but one instance of a toolbar not really being visible. No, I don't know what happens if all toolbars are totally visisble. No, I'm not going to try it and see. I'm running out of time.

    Even if you run the macro and turn off all the toolbars ("Look! There's a sheet of blank paper under here!"), you haven't really changed the templates, I guess, since they haven't been saved. The toolbars will re-appear the next time you can load Word without it crashing.

    If Word DOES crash, remember to delete all those ~.DOTTY things from your Startup folder before you next load Word after rebooting. Word is funny about 1Kbyte template files.

    If you decide to open Word WITHOUT the startup files so that you can open all 196 templates, and THEN clear the toolbars and issue a File, saveAll by holding down the shift key while clicking File, consider first disabling virus protection, if only for this one load. It will save you installing a new mouse when your old one wears out the click button.

    Above all, don't get so wrapped up in documenting this sort of thing that you repeat the exercise of opening all 196 templates after forgetting to disable macro virus protection.

    Even when you've fired up Word, opened all 196 templates, fired up VBE, run the little macro above to close all toolbars, and then run a second macro to issue a FileSave on each template, the next time you open word, all the toolbars will again display. This is a good time to go to a movie.

    It has been suggested that I write an AutoExec macro. I'm glad it was only a suggestion.
    Attached Files Attached Files

  10. #10
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    Why do you hate me? (grin!)

    Please see my reply to geoffW

  11. #11
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening templates

    I don't see why you need 196 million templates any way, but there you are.

    Autoexec code in your normal.dot should only run once (each time you open Word) and may preload the macros. The toolbars are a different issue.

    You could make a macro which does not very much (like type "1") and put it in a template with out anything else. You could then ctrl-C on the file and ctrl-V about 40 times. This would make enough of a test bed to compare ... Oh! I'll try it and get back to you.
    David Grugeon
    Brisbane Australia

  12. #12
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Opening templates

    OK, so I did that. Opening Word (with 54 templates in startup directory) now takes 22 seconds (against negligible, say 3 or 4 without the templates). Running a macro does not seem to cause any delay.

    I thought at first the delay was because I also had the Prime Bookmark template in there as well which has autoexec andf autoopen macros but removing this did NOT affect the time for Word to load.
    David Grugeon
    Brisbane Australia

  13. #13
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    Chris,

    A reply to me? There's none in this thread.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  14. #14
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    > The toolbars are a different issue.

    Indeed they are. In the end I got confused about what I was timing and really lost track of it, what with the number of times I had to ctrl-Alt-del Word because I'd forgotten to turn off something.

    1) I believe that the number of Startup templates significantly affects everything at some time or another.

    2) I believe that the number of Toolbars on display also affects something before too long. Since #Toolbars is probably closely related to #Startup templates, ... There was something about VBE taking inordinately long while the toolbars were present, but there again, maybe it was the run when the toolbars weren't there because I opened Word in Clean mode and just FileOpened the 196 templates.

    3) There was something else fishy going on. I *know* I opened 196 (Click-Shift-Click in the FileOpen dialogue box) but a Window Arrange seemed to show only about 30 tempaltes - as if Word decided to expose only one of each generic template (I have about 30 application templates, where the generic Indxr appears as Indxr001.dot, Indxr002.dot etc.)


    Addendum to Traps For Young Players
    ===================================


    Don't forget that when you're finished playing around REMOVE ALL 196 TEMPLATES from the Startup folder before you try to do any serious work with Word, otherwise (oh, see ~Dotty above).

  15. #15
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Opening templates

    Repeat your experiment, but issue a Tools, Macro, VBE from within Word. 54 templates should delay you by about 90 seconds or so.

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
  •