I’m using WordAutomation to print form letters. The basic program logic is as follows:
Create Word object, opening minimized and visible Read each record from recordset, and do following: Create new letter from template. Resolve boomarks. Print letter. Close letter without saving. When finished with all letters, close Word Object.
This works fine. However, I also have an Preview alternative in which the user can review/change each letter prior to printing. The Word object is not minimized, and I have a msgbox insert prior to the Print command.
This works also, but requires 1 cosmetic change. When the Word object is opened, it becomes the current window object. So the first letter displays on the screen, and the Access message box displays on top of that, which I like. However, as soon as I make a selection from the msgbox, Access becomes the current application again, and the next letter doesn’t actually show on the screen because it is behind Access. How do I make the Word Object move back on top when the next letter opens? I suppose I could keep closing/opening word object itself, but that would slow-down processing too much.