Mailmerge with Word, error message has no focus

Stef-BStef-B Member Posts: 26
For a long time already I deal with the following problem:

I'm starting a mailmerge Word Document from Navision. Word opens but has not the focus. That's ok because it's only one klick away in the Taskbar
.
But: If there's any problem mit the mailmerge (e.g. mailmergefield does not exist) there is no Word in the task-Bar. Navision is waiting for Word and the Word Error Message Box is hidden behind Navision. There's no chance to see wether navision still tries to start word or if there's an error.

Does anyone have a tweak how to force word to get the focus as soon as it is started, so even the error messages appear in front an not hidden behind NAV?

Answers

  • Stef-BStef-B Member Posts: 26
    Thanks to NixPT who wrote me a response this problem is solved.
    The solution is quite simple:
    try this after create the word instance to see the word.

    wrdApp.Visible := TRUE;
Sign In or Register to comment.