G
Greg Oij
I have an application that displays a document next to
another one after analyzing the origional one.
It is compatible with Word '97, Word 2000, Word XP, and,
with one small exception, Word 2003.
When the new document is displayed, it should be
displayed on top of the origional document. The new
document is always displayed on top of the origional in
Word '97, Word 2000, and Word XP, and about 80% of the
time in Word 2003.
The code that I've tried to remedy this 20% problem is:
Windows("WindowCaptionName").Activate
Documents(DOCNUMBER).Activate
I know that the "WindowCaptionName" and DOCNUMBER
variables are correct through setting breakpoints.
When that didn't work 100% of the time (again, this
problem only occurs in Word 2003), I tried:
ActiveWindow.SetFocus
after, which didn't seem to make any difference.
Is there a command in VBA for Word 2003 that will
guarantee that the new document is always displayed on
top of the origional doc?
Thank you for any ideas that you might have.
another one after analyzing the origional one.
It is compatible with Word '97, Word 2000, Word XP, and,
with one small exception, Word 2003.
When the new document is displayed, it should be
displayed on top of the origional document. The new
document is always displayed on top of the origional in
Word '97, Word 2000, and Word XP, and about 80% of the
time in Word 2003.
The code that I've tried to remedy this 20% problem is:
Windows("WindowCaptionName").Activate
Documents(DOCNUMBER).Activate
I know that the "WindowCaptionName" and DOCNUMBER
variables are correct through setting breakpoints.
When that didn't work 100% of the time (again, this
problem only occurs in Word 2003), I tried:
ActiveWindow.SetFocus
after, which didn't seem to make any difference.
Is there a command in VBA for Word 2003 that will
guarantee that the new document is always displayed on
top of the origional doc?
Thank you for any ideas that you might have.