word com add_in crashes

Q

qlu_less

I am niew to add-ins (and to VB for that matter too). This list has already saved my day when the project I inherited suddenly stopped working. I searched the archives and found that remark of reenabling addin in the about box if disabled... just don't want to think how long it would have took me to figure out on my own

Anyway the add-in works now, and the question I have is it crashes under Visual Basic every time I start MS word close it and then restart again. It gives me some kind of prepostorous error (I think) something about remote server not found. So what I was doing so far is every time I close the word I also stop the add-in in visual basic, then restart add-in and run word again. Interestingly, the compiled add-in doesn't do this so it is a fairly minor development inconvenience but I am just curious if anybody knows the reason
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?cWx1X2xlc3M=?=,
Anyway the add-in works now, and the question I have is it crashes under Visual Basic
every time I start MS word close it and then restart again. It gives me some kind of
prepostorous error (I think) something about remote server not found. So what I was doing
so far is every time I close the word I also stop the add-in in visual basic, then restart
add-in and run word again. Interestingly, the compiled add-in doesn't do this so it is a
fairly minor development inconvenience but I am just curious if anybody knows the reasonThere are a number of things that can cause the error message I think you mean. There are
even a couple of arrticles on the topic in the Knowledge Base on microsoft.com. But the
most common ones we see when it comes to automating Office products are:
- object variables (pointers) to the application not being released properly (and this
could indeed be the case if the Word app is being closed, but not the addin)
- application-specific functions are not properly qualified. For example, there's a
Word function InchesToPoints that, outside of Word, should be qualified by the Word
application object - wdApp.InchesToPoints - but one often forgets to do this because it may
work the first time something is executed, but not later

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
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 :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top