D
Denise Z
-----Original Message-----
My question is this: When I use the following macro, then
at some point exit Word, I get a run-time error that the
object can't be found (5852). I'm confused, because the
object that I revised is the current doc, not the normal
template. The macro copies styles into the current
document and then changes the key bindings for the
document. The key bindings need to stay with each document
so a different user can retrieve it and have the same
keystrokes.
The key bindings are set using the following code that
resides in a for loop (KeyType is a variant that increases
1 with each pass (i.e., wdKey1, wdKey2, etc. up to wdKey8)
(ParamType$ is the name and level of the style):
CustomizationContext = Documents(CurDocName$)
KeyBindings.Add KeyCode:=BuildKeyCode(KeyType, wdKeyAlt),
KeyCategory:= wdKeyCategoryStyle, Command:=ParamType$
Any ideas how to get Word to exit without an error
message? I already tried an AutoExit macro to ignore any
errors, but it won't budge.
Thanks.
.