Getting an error while closing the document using word 2007 API

K

KBK

Hi,

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.

Thanks,
Bala
 
C

Cindy M.

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

KBK

It seems like an issue with the upgrading to 2007 from 2003. Issue went away
after applying the latest updates for office.
 
C

Cindy M.

It seems like an issue with the upgrading to 2007 from 2003. Issue went away
after applying the latest updates for office.
Thanks for the update.

Cindy Meister
 

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