Disable User Interaction in Word When Invoked from Scripts 
Author Message
 Disable User Interaction in Word When Invoked from Scripts

Is there a way to stop word from showing interactive dialog boxes when
invoked from a VBScript, VB program or others using the CreateObject()?

Openning a dialog box when run from a program causes the program to hang and
there is no way of detecting this condition to responding to it.

Thanks
Jeff



Tue, 20 Dec 2005 00:42:07 GMT  
 Disable User Interaction in Word When Invoked from Scripts
Jeff,

Word, like all other Office apps, is designed to interact
with the end user so it's very difficult to get around
the situation you want to avoid.  Here's a knowledge base
article you might fight extremely useful....

PSS ID Number: 257757

Article Last Modified on 10/17/2002

This article was previously published under Q257757

SUMMARY
Developers can use Automation to Microsoft Office to
build custom solutions that utilize the capabilities and
features that are built into the Office product. While
such programmatic development can be implemented on a
client system with relative ease, there are a number of
complications that can occur if Automation is to take
place from server-side code such as Active Server Pages
(ASP), DCOM, or an NT Service.

This article discusses the complications that developers
may face, offers alternatives to Automation that can
speed performance, and suggests ways to configure Office
if server-side Automation is unavoidable. Developers
should be aware, however, that the suggestions provided
below are for informational purposes only. Microsoft does
not recommend or support server-side Automation of Office.

NOTE: In this context, the term "server-side" also
applies to code that is running on a Microsoft Windows NT
or Microsoft Windows 2000 workstation, provided that it
is running from a WinStation other than the interactive
station of the user that is logged on. For example, code
that is started by Task Scheduler under the SYSTEM
account runs in the same environment as "server-side" ASP
or DCOM code, and therefore experiences many of the same
issues. For more information on WinStations and COM, see
the "More Information" and "References" sections.

Quote:
>-----Original Message-----
>Is there a way to stop word from showing interactive
dialog boxes when
>invoked from a VBScript, VB program or others using the
CreateObject()?

>Openning a dialog box when run from a program causes the
program to hang and
>there is no way of detecting this condition to
responding to it.

>Thanks
>Jeff

>.



Tue, 20 Dec 2005 03:01:07 GMT  
 Disable User Interaction in Word When Invoked from Scripts
Jeff,

Just to highlight one point in the article I suggested,
under "Problems Using Automation of Office Server-Side"
there appears

Interactivity with the Desktop: Office Applications
assume that they are being run under an interactive
desktop, and may in some circumstances need to be made
visible for certain Automation functions to work
properly. If an unexpected error occurs, or an
unspecified parameter is needed to complete a function,
Office is designed to prompt the user with a modal dialog
box that asks the user what they want to do. A modal
dialog box on a non-interactive desktop cannot be
dismissed, which causes that thread to stop responding
(hang) indefinitely. Although certain coding practices
can help reduce the likelihood of this occurring, they
cannot prevent it entirely. This fact alone makes running
Office Applications from a server-side environment risky
and unsupported.

Quote:
>-----Original Message-----
>Is there a way to stop word from showing interactive
dialog boxes when
>invoked from a VBScript, VB program or others using the
CreateObject()?

>Openning a dialog box when run from a program causes the
program to hang and
>there is no way of detecting this condition to
responding to it.

>Thanks
>Jeff

>.



Tue, 20 Dec 2005 03:06:17 GMT  
 Disable User Interaction in Word When Invoked from Scripts
Jeff,

In case you don't have a chance to read the entire
article I suggested here is a point I think you'll find
useful:

Problems Using Automation of Office Server-Side

INTERACTIVITY WITH THE DESKTOP: Office Applications
assume that they are being run under an interactive
desktop, and may in some circumstances need to be made
visible for certain Automation functions to work
properly. If an unexpected error occurs, or an
unspecified parameter is needed to complete a function,
Office is designed to prompt the user with a modal dialog
box that asks the user what they want to do. A modal
dialog box on a non-interactive desktop cannot be
dismissed, which causes that thread to stop responding
(hang) indefinitely. Although certain coding practices
can help reduce the likelihood of this occurring, they
cannot prevent it entirely. This fact alone makes running
Office Applications from a server-side environment risky
and unsupported.

Quote:
>-----Original Message-----
>Is there a way to stop word from showing interactive
dialog boxes when
>invoked from a VBScript, VB program or others using the
CreateObject()?

>Openning a dialog box when run from a program causes the
program to hang and
>there is no way of detecting this condition to
responding to it.

>Thanks
>Jeff

>.



Tue, 20 Dec 2005 03:18:33 GMT  
 Disable User Interaction in Word When Invoked from Scripts
Hi Microsoft,

Quote:
> Is there a way to stop word from showing interactive dialog boxes when
> invoked from a VBScript, VB program or others using the CreateObject()?

No, there's not. That's one reason Office products aren't recommended to
be run on servers.

INFO: Considerations for Server-Side Automation of Office [Q257757]
http://support.microsoft.com?kbid=257757

Best you can possibly to is set DisplayAlerts to none. But that won't
suppress all possible messages Word could show.

There is a kludge-workaround that you can use to get rid of a dialog box
if the app appears to "hang" for a given amount of time. See

Q259971 HOWTO: Dismiss a Dialog Box Displayed by an Office Application
with
http://support.microsoft.com?kbid=259971

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)



Wed, 21 Dec 2005 19:48:27 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Avoid user interaction when saving Word document as html

2. Word crashes when invoking user form

3. 'Remote Scripting Error: Page invoked does not support remote scripting

4. script (vbscript) to disable a user mailbox

5. Can I disable users from using Word

6. How to disable user exit word?

7. How to disable user to exit MS Word?

8. ActiveX control and Client script interaction problem

9. Script Control and Debugger interaction

10. Server interaction from client-side script

11. Delete Excel sheet without user interaction.

12. locking MS Project from user interaction

 

 
Powered by phpBB® Forum Software