Word OpenDocument produces popup

H

Hammad

Hello,

I get the following error when I load a particular word document.

"an error occurred while loading 'thisdocument'"

The reason this occurs is some sort of conflict with the "normal.dot"
template and the template attached to the original document. If I load the
document using the /a command line switch, it loads the document w/o this
message. It seems that the word.application automation object always has the
"Normal.dot" template as part of its template collection.

The problem is, I am using the word object for an automated process and the
popping up of this dialog cannot occur because it halts the processing. I'm
wondering if there is a way to programatically not allow this to popup or
allow it to automatically select "yes" or "no" on the dialog itself as some
sort of option on the word.application object?

To me, this is not good. If Microsoft provides the ability to automate
Word, it should also provide a situation that allows the hiding of message
boxes so they don't pop up for automated processing. OpenDocument should
throw an exception if this situation occurs.

Thanks,

Hammad
 
W

Word Heretic

G'day Hammad said:
It seems that the word.application automation object always has the
"Normal.dot" template as part of its template collection.

This is 100% correct!

Generically, we use an application.displayalerts = wdalertsnone to TRY
and combat this behaviour. Unfortunately for us, MS has been less than
dilligent at implementing this. To be fair, 3rd party devs do even
worse as a rule of thumb. Personally, I try to make all functions
sensitive to this setting.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Hammad reckoned:
 
H

Hammad

Hi Steve,

Thanks for answering my question. Unfortunatley, I have that specific flag
set just as you stated and the message box still pops up. Apparently, there
seems to be no way around it if that is the only solution.

Thanks,

Hammad
 
W

Word Heretic

G'day Hammad <[email protected]>,

You may have conflicting objects in your template then. Rename
Normal.dot - if your problem doesn't go away then recreate your
template - tools > organizer will help copy stuff over.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Hammad reckoned:
 
H

Hammad

Hi Steve,

Thanks for the response. I'm not sure exactly what you mean. Even if I was
sure, the problem is the processing of those word files are automated. Is
there a way to do what you're suggesting programatically?

Thanks,

Hammad
 
W

Word Heretic

G'day Hammad <[email protected]>,

You have a template that contains all the macro magic. Maybe that
template needs recreating because it has a bad object conflicting with
your documents.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Hammad reckoned:
 

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