How to bring a Word window to front?

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Hello, friends,

In c#.net 2005, we have the following source, hoping to bring a Word window
to front. However, it does not work.

Any ideas? How to bring a Word window to front?

Thanks a lot.

------------------- source code

foreach (Microsoft.Office.Interop.Word.Document doc in this.wordApp.Documents)
{
if (String.Compare(doc.Path + "\\" + doc.Name, fullPathFileName, true)
== 0)
{
doc.Activate();
return;
}
}
 
Back
Top