Re: Getting an error while closing the document using word 2007 API

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi =?Utf-8?B?S0JL?=,

We are using the word automation to process the bookmarks in a document and
everything works fine in Word 2003 but it is failing in Word 2007.

I found that the following code is prompting a dialog which the user can't
see as we set the Application.Visible to False.

The dialog throws the following message.

"Sub or function not defined".

Please let me know if anyone has run into the same problem and found an
alternative.

Impossible to say without knowing where this is coming from. It looks very
much like a macro is trying to execute, calling a procedure that's not
available to it in the current context. Hard to say more without knowing more
details about what your project is trying to do, and in what kind of
environment.

Is this happening on a user's machine or in a test environment? What's the
macro security setting? If you compile your project with the application set
to be Visible so that you can get a good look at this message, does it have an
option to "Debug"? If it does, where does that take you?

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

.