Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
developer
active.documents
automation
binary.file_format
clipboard.dde
com.add_ins
hosting.controls
internet_other
office.sdks
officedev
officedev.other
outlook.forms
outlook.vba
smarttags
vba
web.components
  
 
date: Fri, 2 May 2008 04:45:00 -0700,    group: microsoft.public.office.developer.automation        back       


How can I change the ActiveDocument property in Office.Interop.Wor   
Hi,
I have a C# Windows Forms app that uses separate instances of the WebBrowser 
control to host Word documents.  Assume I have 2 open.  The last one opened 
becomes the _application.ActiveDocument.  This does not change even when I 
bring the first opened document to the foreground.  I can edit that one but 
right 
clicking on a misspelled word does not invoke the spelling menu as it does on 
the last document opened.  I wish I could do something like 
_application.ActiveDocument = _document so that I could set the 
_application.ActiveDocument property at will. Unfortunately, that property is 
ReadOnly.  Is there another way I can reset the ActiveDocumet property?
Thanks for your help!
date: Fri, 2 May 2008 04:45:00 -0700   author:   Mario Montes

RE: How can I change the ActiveDocument property in Office.Interop.Wor   
I found the answer to my question: _document.SetFocus() will update the 
applications ActiveDocument.  Unfortunately this did not solve my problem as 
I had hoped.  The Word context menu (not just the spelling menu as mentioned 
in the original post) is no longer available for the first document. If I 
close and reopen first, the context menu is back for this  document, but is 
no longer available if I swicth to the other.

Any ideas?

Thanks 

"Mario Montes" wrote:

> Hi,
> I have a C# Windows Forms app that uses separate instances of the WebBrowser 
> control to host Word documents.  Assume I have 2 open.  The last one opened 
> becomes the _application.ActiveDocument.  This does not change even when I 
> bring the first opened document to the foreground.  I can edit that one but 
> right 
> clicking on a misspelled word does not invoke the spelling menu as it does on 
> the last document opened.  I wish I could do something like 
> _application.ActiveDocument = _document so that I could set the 
> _application.ActiveDocument property at will. Unfortunately, that property is 
> ReadOnly.  Is there another way I can reset the ActiveDocumet property?
> Thanks for your help!
>
date: Fri, 2 May 2008 05:49:12 -0700   author:   Mario Montes

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us