How to Activate a Word document?
I am creating word document from c# windows application. but Word document is getting minimized even though i used the Activate() method to activate the document.
(it is working fine when debugging but in release version document getting minimized)
How I Can Make the document active one???
Thanks in advance.
my code is almost like this
Microsoft.Office.Interop.Word.Document document;
object objFileName = locationOfFile; object objTrueValue = true; object objMissing = Type.Mis开发者_如何学Gosing;
document = application.Documents.Open(ref objFileName, ref objMissing, ref objTrueValue, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref objMissing);
document.Activate();
It is working for both.
document = application.Documents.Open(@"\Docu.docx", ReadOnly: false, Visible: true );
set the Visible:true, Document.Activate(); is not required.
It would be help more if you show your code.
精彩评论