Hi
From a reply that was made to a simlilar query of my own someone said ShellExecute last parameter is:
0 Hides the window and passes activation to another window.
1 Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as 9).
2 Activates a window and displays it as an icon.
3 Activates a window and displays it as a maximized window.
4 Displays a window in its most recent size and position. The window that is currently active remains active.
5 Activates a window and displays it in its current size and position.
6 Minimizes the specified window and activates the top-level window in the system's list.
7 Displays a window as an icon. The currently active window remains active.
8 Displays a window in its current state. The window that is currently active remains active.
9 Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position (same as 1).
I did find that if I try to load MS Word with the same document then Word would
not load a new copy but use the same instance that was already open. I have switched to using the FindExecutable() function and then running it using RUN/N the app with the document I want. This works fine for me.
HTH
Jos
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.