I have written a form in delphi which accepts user input and creates a letter in MS word with mail merge and a letter template. It is working perfectly, but if I try to create a second letter while any letter created with the same template is open, it will not work, word does not launch with a new window. If another doc created from another word template is open, it works perfectly. The code for the app is available if required, I just don't want to fill the whole screen up with rubbish!! The line which launches word with the necessary data is:
ShellExecute(Handle, 'open', 'data\testing.bat', nil, nil, SW_SHOW);
testing.bat just contains the following line: c:\Progra~1\jodlet~1\data\jodletter.dot
The reason for using a batch file rather than just launching it directly from within delphi is that the batch file opens a doc based on the dot, but when I tried it directly from within delphi it opened the actual .dot file.
Any help would be greatly appreciated, this project has me driven mental at this stage.