Disabling Word error alerts when in vB?

D

Dennis

Hi,

My task is replacing Word Perfect INCLUDE statements with
Word LINK statements. I have been able to do this
programmatically in a vB program. However, if the LINK that
I'm inserting is not "resolvable" at the time I insert it
(no access to the netword drive for example), Word
generates an error alert box.

I need to be able to disable that alert. I KNOW that the
files aren't available at the time. I don't care. I just
want vB to be able to insert the LINKs into the Word doc.

One note: I *DO* have Word open at the time. If I run the
program with Word CLOSED, will the error box issue go away?
I would really like to be able to set an option in my vB
program to ignore (and not transfer control to Word)
whenever such an error occurs.

Any ideas?

Thanks!
 
C

Cindy M -WordMVP-

Hi Dennis,

There is no way to suppress all alerts in Word, although you
can catch some of them by setting Application.DisplayAlerts.

However, you might consider using a different approach to
create these links. Word manages all links using fields; if
you insert the appropriate field code directly into a
document you shouldn't get any message alert (just error
messages display in the document, in place of the linked
object).

And just BTW, you can't automate a Word document without
opening it in Word. (The exception being if you create the
document as an HTML file or using WordML with Office 2003)
My task is replacing Word Perfect INCLUDE statements with
Word LINK statements. I have been able to do this
programmatically in a vB program. However, if the LINK that
I'm inserting is not "resolvable" at the time I insert it
(no access to the netword drive for example), Word
generates an error alert box.

I need to be able to disable that alert. I KNOW that the
files aren't available at the time. I don't care. I just
want vB to be able to insert the LINKs into the Word doc.

One note: I *DO* have Word open at the time. If I run the
program with Word CLOSED, will the error box issue go away?
I would really like to be able to set an option in my vB
program to ignore (and not transfer control to Word)
whenever such an error occurs.

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 :)
 

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