Click here to Skip to main content
15,910,981 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I need to open several windows of MS WORD but I can only do it once . here is the code to open Word:
C#
Process proc = new Process();
           try
           {

               wdwIntPtr = FindWindow(null, processName);
               proc.EnableRaisingEvents = true;
               proc.StartInfo.UseShellExecute = false;

               proc.StartInfo.FileName = processName;
               proc.StartInfo.CreateNoWindow = true;

               proc.Start();
}

When I call it I put to processName @"\Program Files\Microsoft Office\Office15\WINWORD.EXE"
The error that I got is : "the requested information are not available because the process is not executed"

What I have tried:

i can't open Office product but notepad , calculator work. I can open several times
Posted
Updated 8-Sep-16 9:13am
v3
Comments
[no name] 8-Sep-16 12:17pm    
And is your question "Can people on the internet guess what errors you see on your screen from half a world away?"?
TatsuSheva 8-Sep-16 12:20pm    
I have edited my question
Dave Kreskowiak 8-Sep-16 12:30pm    
Ummm, Word is a single instance application. You can't launch multiple copies of it. If you try, you get the original instance of the app with a new document window.
TatsuSheva 8-Sep-16 12:38pm    
yes that's right , so there is not a solution ?
[no name] 8-Sep-16 13:05pm    
Well you *could* ask Microsoft to re-write Word to suit you but there isn't much chance of that happening.

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900