Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / October 2003

Tip: Looking for answers? Try searching our database.

Interop with Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 28 Oct 2003 19:39 GMT
Hi,

I'm using word in my C# windows application.  I added an event handler to
handle DocumentBeforeClose event.  Inside the event handler, I set the
second parameter Cancel to true.    According to documentation, if Cancel is
true, the document will not be closed.  But the document closes anyway with
my interop application.

I know this worked when I used the COM server directly.   Help?   Thanks

dax
Jian-Shen Lin[MS] - 29 Oct 2003 03:25 GMT
Hi Dax,

The problem is you are using VS.NET 2003, which is based on 1.1 Framework.
There is a known bug with the Cancel parameter in Office application events
when run from 1.1 framework. Roll back to 1.0 Framework (VS.NET 2002), or
override the delegate class for the event handler in your 1.1 code in order
to implement your own connection point class handler. The problem is an
issue with the Word/Excel type libraries and how the Cancel parameter is
marshalled. This is a known bug with Office 2000 and Office XP, which was
fixed in Office 2003.


Thanks

Jian Shen

This posting is provided "AS IS" with no warranties, and confers no rights.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.