What you can do is move the
To "after" the msgbox command.
However, this means that word will not yet have appeared. However, you
really don't have a choice here, as you MUST bring ms-access to the front
again to show the msg command. You are not going to get "just" the msgbox
anyway, and thus all of ms-access will show.
So, I would just move the WordApp.Visible to right "after" the msgbox, and
you should be fine.
Also, as side note, that example code uses:
AppActivate "Microsoft Word"
You should replace the above with:
wordApp.Activate
wordApp.WindowState = 0 'wdWindowStateRestore
I recognize my word merge code here, and I have since changed the above,
since if you upgrade to word2000 or latter , then the title window changes
on you all the time, and your code will break. So, my wordmerge example code
now always uses the 2nd example to active word, as then the title bar name
does mess things up (now that word appears multiple times in the task bar,
and part of the document name is the application name now).