-
WSplarb
AskWoody LoungerOctober 28, 2004 at 9:28 pm in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #892906Bob,
1. have not had this problem in our XP (Windows and Office) for quite a while
2. never had it in my 2003 Dev environment, but my Word colleague has had the problem
3. Try this piece of code
This code needs to reside in a module named “AutoExec” in your Normal.dot
Sub AutoExec()
Dim iNumber As Integer
Dim iCount As Integer
Dim sIniFile As StringsIniFile = Options.DefaultFilePath(Path:=wdWorkgroupTemplatesPath) + “Environ.ini”
iNumber = Val(System.PrivateProfileString(sIniFile, “StartUpTemplates”, “Number”))
For iCount = 1 To iNumber Step 1
AddIns.Add FileName:=System.PrivateProfileString(sIniFile, “StartUpTemplates”, CStr(iCount)), Install:=True
Next iCount
End SubNow the “Environ.ini” file looks like this:
[StartUpTemplates]
Number=6
1=h:applstemplate1.dot
2=h:appls template2.dotTry this and see how you go.
REMEMBER: this is NOT perfect, we still get the same problem albeit infrequent (haven’t seen it for 6 months), but lets see if it alleviates the issues you are getting and also makes your startup a bit smarter.
Pete
-
WSplarb
AskWoody LoungerOctober 28, 2004 at 9:28 pm in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #892907Bob,
1. have not had this problem in our XP (Windows and Office) for quite a while
2. never had it in my 2003 Dev environment, but my Word colleague has had the problem
3. Try this piece of code
This code needs to reside in a module named “AutoExec” in your Normal.dot
Sub AutoExec()
Dim iNumber As Integer
Dim iCount As Integer
Dim sIniFile As StringsIniFile = Options.DefaultFilePath(Path:=wdWorkgroupTemplatesPath) + “Environ.ini”
iNumber = Val(System.PrivateProfileString(sIniFile, “StartUpTemplates”, “Number”))
For iCount = 1 To iNumber Step 1
AddIns.Add FileName:=System.PrivateProfileString(sIniFile, “StartUpTemplates”, CStr(iCount)), Install:=True
Next iCount
End SubNow the “Environ.ini” file looks like this:
[StartUpTemplates]
Number=6
1=h:applstemplate1.dot
2=h:appls template2.dotTry this and see how you go.
REMEMBER: this is NOT perfect, we still get the same problem albeit infrequent (haven’t seen it for 6 months), but lets see if it alleviates the issues you are getting and also makes your startup a bit smarter.
Pete
-
WSplarb
AskWoody LoungerOctober 27, 2004 at 11:32 pm in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #892487Morning,
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 iTry and place the good ‘ol “DoEvents” – I always place several to yield to the Windows events.
Hope that helps
Pete
-
WSplarb
AskWoody LoungerOctober 27, 2004 at 11:32 pm in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #892488Morning,
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 iTry and place the good ‘ol “DoEvents” – I always place several to yield to the Windows events.
Hope that helps
Pete
-
WSplarb
AskWoody LoungerOctober 26, 2004 at 3:05 am in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #891970Afternoon
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
-
WSplarb
AskWoody LoungerOctober 26, 2004 at 3:05 am in reply to: Global template suddenly causes serious error (Word 2002 SP-2) #891971Afternoon
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
-
WSplarb
AskWoody LoungerI really think just lik in Word you need to capture the “event”.
Have a look at event trapping:
“with events” is the key search word
Dim MyClass As New clsWordApp
Sub AutoOpen()
Dim wdSaveProtectionType As IntegerOn Error GoTo ErrorHandler
Call Register_Event_Handler
End SubSub Register_Event_Handler()
Set MyClass.appWord = Word.Application
End SubPete
-
WSplarb
AskWoody LoungerI really think just lik in Word you need to capture the “event”.
Have a look at event trapping:
“with events” is the key search word
Dim MyClass As New clsWordApp
Sub AutoOpen()
Dim wdSaveProtectionType As IntegerOn Error GoTo ErrorHandler
Call Register_Event_Handler
End SubSub Register_Event_Handler()
Set MyClass.appWord = Word.Application
End SubPete
-
WSplarb
AskWoody LoungerToolbar, menu bar Buttons: 16 * 16
Desktop icons 32* 32
Soem people will also say that 16 * 15 is ok as well
Pete
-
WSplarb
AskWoody LoungerToolbar, menu bar Buttons: 16 * 16
Desktop icons 32* 32
Soem people will also say that 16 * 15 is ok as well
Pete
-
WSplarb
AskWoody LoungerOctober 13, 2004 at 1:48 am in reply to: test if Word document is already open in VB (Word 2000) #1808889don’t be lazy….try
Randy Birch in Google – the very first match is him !
Pete
-
WSplarb
AskWoody LoungerOctober 12, 2004 at 2:02 am in reply to: test if Word document is already open in VB (Word 2000) #1808871Checkout Randy Birch Win32 website. It has far faster code for copying files.
Pete
-
WSplarb
AskWoody LoungerMethod ‘Navigate’ of object ‘IWebBrowser2’ failed
Afternoon,
I am using the webbrowser control on a form.
– yes, I have searched extensively on Google
1. set the URL for example:
Me.WebBrowser.Navigate “about:blank”
2. problem arises when I change the path the next time around. Fo rexample on the “click” event of a button.
I receive the following error:
Method ‘Navigate’ of object ‘IWebBrowser2’ failedAny ideas?
Thanks
Pete
-
WSplarb
AskWoody LoungerMethod ‘Navigate’ of object ‘IWebBrowser2’ failed
Afternoon,
I am using the webbrowser control on a form.
– yes, I have searched extensively on Google
1. set the URL for example:
Me.WebBrowser.Navigate “about:blank”
2. problem arises when I change the path the next time around. Fo rexample on the “click” event of a button.
I receive the following error:
Method ‘Navigate’ of object ‘IWebBrowser2’ failedAny ideas?
Thanks
Pete
-
WSplarb
AskWoody LoungerAnswer:
you can NOT use a WebBrowser control on a MultiPage control – and that’s it !
Workaround: they are bad but this is the only answer.
1. Minimise the MultiPage control to a height say 17. This makes the user think they are working on a multi page but they are not ! yes, you do not get the good looking layered and edging effect.
2. Layer your controls over each other and make them visible / invisible depening upon what they click.
In other words bring to the webbrowser control to the front when needs be and make sure it can hide behind another control in the meantime.
Then the you will have no erros when navigating to new URL’s.
Pete
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Are manuals extinct?
by
Susan Bradley
39 minutes ago -
Canonical ditching Sudo for Rust Sudo -rs starting with Ubuntu
by
Alex5723
3 hours, 48 minutes ago -
Network Issue
by
Casey H
10 hours, 19 minutes ago -
Fedora Linux is now an official WSL distro
by
Alex5723
15 hours, 47 minutes ago -
May 2025 Office non-Security updates
by
PKCano
16 hours, 14 minutes ago -
Windows 10 filehistory including onedrive folder
by
Steve Bondy
18 hours, 9 minutes ago -
pages print on restart (Win 11 23H2)
by
cyraxote
17 hours, 25 minutes ago -
Windows 11 Insider Preview build 26200.5581 released to DEV
by
joep517
20 hours, 21 minutes ago -
Windows 11 Insider Preview build 26120.3950 (24H2) released to BETA
by
joep517
20 hours, 22 minutes ago -
Proton to drop prices after ruling against “Apple tax”
by
Cybertooth
1 day, 3 hours ago -
24H2 Installer – don’t see Option for non destructive install
by
JP
12 hours, 6 minutes ago -
Asking Again here (New User and Fast change only backups)
by
thymej
1 day, 15 hours ago -
How much I spent on the Mac mini
by
Will Fastie
14 hours, 29 minutes ago -
How to get rid of Copilot in Microsoft 365
by
Lance Whitney
9 hours, 40 minutes ago -
Spring cleanup — 2025
by
Deanna McElveen
1 day, 20 hours ago -
Setting up Windows 11
by
Susan Bradley
16 hours ago -
VLC Introduces Cutting-Edge AI Subtitling and Translation Capabilities
by
Alex5723
1 day, 16 hours ago -
Powershell version?
by
CWBillow
1 day, 17 hours ago -
SendTom Toys
by
CWBillow
4 hours, 8 minutes ago -
Add shortcut to taskbar?
by
CWBillow
1 day, 21 hours ago -
Sycophancy in GPT-4o: What happened
by
Alex5723
2 days, 13 hours ago -
How can I install Skype on Windows 7?
by
Help
2 days, 12 hours ago -
Logitech MK850 Keyboard issues
by
Rush2112
1 day, 19 hours ago -
We live in a simulation
by
Alex5723
3 days, 3 hours ago -
Netplwiz not working
by
RetiredGeek
2 days, 14 hours ago -
Windows 11 24H2 is broadly available
by
Alex5723
3 days, 16 hours ago -
Microsoft is killing Authenticator
by
Alex5723
17 hours, 59 minutes ago -
Downloads folder location
by
CWBillow
3 days, 22 hours ago -
Remove a User from Login screen
by
CWBillow
2 days, 18 hours ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.