How to bring a Word window to front?

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;
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top