chetan Allipur

chetan Allipur

  • NA
  • 541
  • 166.4k

How to bring the he document to front while open.

Sep 1 2017 1:56 AM
I have a problem. I used doc.Activate() to bring the document to front but it doesn't work, the document remains in back.
 
I am closing Blank active document firts.
  1. if (app.ActiveDocument != null)  
  2. {  
  3. oWordDoc = app.ActiveDocument;  
  4. if (Ribbon1.docnum == 1)  
  5. {  
  6. oWordDoc.Close();  
  7. }  
  8.   
  9. }  
  10. oWordDoc = app.Documents.Open(destinationPath, missing, false, missing, missing, missing, false, missing, missing, missing, missing, missing, missing  
  11. , missing, missing, missing);  
  12. app.Visible = true;  
  13. oWordDoc.Activate();  
Please replay me fast. I am waiting.

Answers (7)