Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
holk leng
 
Posts: n/a
Default why word2003 always crushed if my addin registered?

I wrote a word addin dll by ATL, my purpose is to be notified to extract some
content text when the document is being closed. My addin runs well on
word2000,but always crushed with word2003 when closing the word application.

here is my sample code:
public IDispatchImplIAddin, &IID_IAddin, &LIBID_BDSWORDADDINLib,
public IDispatchImpl_IDTExtensibility2, &IID__IDTExtensibility2,
&LIBID_AddInDesignerObjects,
public IDispEventSimpleImpl1,CAddin,&__uuidof(MSWord::Ap plicationEvents2)
......
BEGIN_SINK_MAP(CAddin)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),2,Quit,&QuitInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),4,DocumentOpen,&DocumentOpenInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),6,DocumentBeforeClose,&DocumentSaveInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),8,DocumentBeforeSave,&DocumentBeforeSaveInfo)
END_SINK_MAP()

I found if I comment out the DocumentBeforeClose event sink above
,everything is ok, or else error occurs when closing the application, even I
let the DocumentBeforeClose function do nothing.

why? Could someone tell me the solution to handle this? Thanks.


  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default why word2003 always crushed if my addin registered?

Hi ?B?aG9sayBsZW5n?=,

If you'd bothered to read any of the messages in this group before posting, you'd have noticed it's a
group targeted at end users. No programming content. Try asking your question in the office.comAddIns
newsgroup.

I wrote a word addin dll by ATL, my purpose is to be notified to extract some
content text when the document is being closed. My addin runs well on
word2000,but always crushed with word2003 when closing the word application.

here is my sample code:
public IDispatchImplIAddin, &IID_IAddin, &LIBID_BDSWORDADDINLib,
public IDispatchImpl_IDTExtensibility2, &IID__IDTExtensibility2,
&LIBID_AddInDesignerObjects,
public IDispEventSimpleImpl1,CAddin,&__uuidof(MSWord::Ap plicationEvents2)
......
BEGIN_SINK_MAP(CAddin)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),2,Quit,&QuitInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),4,DocumentOpen,&DocumentOpenInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),6,DocumentBeforeClose,&DocumentSaveInfo)
SINK_ENTRY_INFO(1,__uuidof(MSWord::ApplicationEven ts2),8,DocumentBeforeSave,&DocumentBeforeSaveInfo)
END_SINK_MAP()

I found if I comment out the DocumentBeforeClose event sink above
,everything is ok, or else error occurs when closing the application, even I
let the DocumentBeforeClose function do nothing.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and
not by e-mail :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I suppress blank address lines in Word2003 mail merge? JonUK5691 Mailmerge 1 March 22nd 05 09:31 PM
how do i put registered symbol at top of last letter glenchunk Microsoft Word Help 1 March 3rd 05 09:53 PM
installing word97 vs word2003 Barb Microsoft Word Help 0 February 2nd 05 09:07 PM
MacOSX user: do i need2uninstall Word98 before i can run Word2003 CambridgeInstallationDummy Microsoft Word Help 1 January 12th 05 07:32 PM


All times are GMT +1. The time now is 11:47 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"