Click here to Skip to main content
15,890,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, I write a some code to process a Word Document using C#.
Application app=new Application();
app.Visible = false;
Document doc;
object missing=System.Reflection.Missing.Value;
doc=app.Documents.Open(ref fileName, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
                ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);
......

when this software process a Word Document "a.doc",Open other Document "b.doc", the "a.doc" is popup. I had set "app.Visible = false;" .
why it display again.

now when this software process a Word Document,can't open other Word Document.
Posted
Updated 8-Feb-11 19:17pm
v3

1 solution

It's impossible to tell what's going on without seeing some of your code, but are you perhaps creating a new Application instance later on? And perhaps you are not setting the Visible property on that instance.
 
Share this answer
 
v2
Comments
whoyousee 8-Feb-11 22:28pm    
I had instanced only one Application.
this code process word take a long time.
have many Action,such as:
Move seletion.

so open other Word Document,will let this software fail.

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