M
Mangesh
Hi,
I have a problem with creation/destruction of our custom command bars for
the office macros ( MS Word) on various combination of OS & Office. Our
Solution is based on suggestions from Microsoft support
(http://support.microsoft.com/kb/245765) issued for MS Word 2000.
Construction of the menu bars isn’t the problem though, but proper
destruction is. What MS basically suggests is to reopen Normal.dot template
(which is where the global menu bars configuration is stored) on AutoExit()
then remove our custom menu bars and then save it. Unfortunately this
solution does not always work and what’s worst on some combination of OS &
Office (ex. Japanese XP + Japanese Office XP) it leads to a crash. This
solution from MS was offered for Word 2000, and it does not work on all
possible OS and Office combinations.
I wish to find a safe way of saving normal.dot template after removing our
custom command bars and icons , so that it works on all supported
combinations of OS & MS Office.
I have implemented the following code during AutoExit() which gives me a
crash on Japanese XP SP2 and Office XP combination, as well as on Vista 2007
while exiting word application.
AutoExit.bas:-
Sub main()
On Error Resume Next
NormalTemplate.OpenAsDocument
Common.RemoveToolbarIcon
Common.RemoveMenuItem
Documents.Save NoPrompt:=True
End Sub
Another crash that we find due to the above exit routine , is that the Word
2007 , when opened in Thumbnail view, crashes with our macro. The above crash
can also be reproduced by using the code written in mentioned
link(http://support.microsoft.com/kb/245765) and made a sample macro
(sample.dot)
and it also crashed when exiting MS word 2007 in thumbnail view with my
sample macro only.
Suggestions/Solutions/Sample code is requested ASAP
Regards
Mangesh
I have a problem with creation/destruction of our custom command bars for
the office macros ( MS Word) on various combination of OS & Office. Our
Solution is based on suggestions from Microsoft support
(http://support.microsoft.com/kb/245765) issued for MS Word 2000.
Construction of the menu bars isn’t the problem though, but proper
destruction is. What MS basically suggests is to reopen Normal.dot template
(which is where the global menu bars configuration is stored) on AutoExit()
then remove our custom menu bars and then save it. Unfortunately this
solution does not always work and what’s worst on some combination of OS &
Office (ex. Japanese XP + Japanese Office XP) it leads to a crash. This
solution from MS was offered for Word 2000, and it does not work on all
possible OS and Office combinations.
I wish to find a safe way of saving normal.dot template after removing our
custom command bars and icons , so that it works on all supported
combinations of OS & MS Office.
I have implemented the following code during AutoExit() which gives me a
crash on Japanese XP SP2 and Office XP combination, as well as on Vista 2007
while exiting word application.
AutoExit.bas:-
Sub main()
On Error Resume Next
NormalTemplate.OpenAsDocument
Common.RemoveToolbarIcon
Common.RemoveMenuItem
Documents.Save NoPrompt:=True
End Sub
Another crash that we find due to the above exit routine , is that the Word
2007 , when opened in Thumbnail view, crashes with our macro. The above crash
can also be reproduced by using the code written in mentioned
link(http://support.microsoft.com/kb/245765) and made a sample macro
(sample.dot)
and it also crashed when exiting MS word 2007 in thumbnail view with my
sample macro only.
Suggestions/Solutions/Sample code is requested ASAP
Regards
Mangesh