次の方法で共有


Scripting in Office Applications

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

In the past, scripting in Office applications was confined to manipulating Microsoft Outlook objects and controls from within an Outlook form. And in one sense this is still the case. You can still use script to work with Outlook objects from within the Outlook application. You still use VBA to work with the objects exposed by Office applications.

What has changed is that you can now use Office applications to create Office documents designed to be viewed with a Web browser. The ability to add script to an Office document from within an Office application is part of the seamless integration with the Internet that Office 2000 was designed to achieve. This section discusses working with the Microsoft Script Editor and using scriptlets. For additional scripting information, see "Working with DHTML and the DHTML Object Model" earlier in this chapter.

Complete coverage of scripting in Web pages is beyond the scope of this book. This section presents an overview of scripting in Office applications in order to help you understand how, when, and why you add script to a document and the Office technologies available to help you work with script. All the script examples in this section are written in VBScript. You can get a complete scripting reference, including the complete VBScript language reference and a VBScript tutorial, in the Htmlref.chm and Vbscrip5.chm files in the C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98\MSE\1033 subfolder.

Note   The path to the Htmlref.chm and Vbscrip5.chm Help files reflects the language ID folder (1033) for U.S. English language support in Office. The language ID folder below C:\Program Files\Microsoft Visual Studio\Common\IDE\IDE98\MSE differs for each language.