Team LiB
Previous Section Next Section

Using the Shared Office Objects

The shared Office objects, listed in Table 8-1, provide support in several important areas of functionality. Some of these object models are not available in all Office components (including Access). The table describes the models, mentions when they have restricted availability across Office components, and highlights where you can find further information about them in this book. To get online help and work with any of these objects, you must reference the Microsoft Office 11.0 Object Library. You can do this through the Tools menu in the Microsoft Visual Basic Editor (VBE) or programmatically.

Table 8.1: Shared Office Objects

Object

Description

Comment

CommandBar

You can use this object and its collections to create and modify toolbars, the menu bar, and shortcut menus. You can make design-time changes manually and with Visual Basic for Applications (VBA) code. You can make run-time changes exclusively with VBA code.

See further discussion and samples in this chapter.

Assistant

You use this object to support custom help requirements for the Office Assistant and Office Assistant balloon. Various properties and methods let you control the type and animation of the assistant, as well as the content and behavior of the balloon.

See further discussion and samples on this topic at www.programmingmsaccess.com /assistantobject.htm .

FileSearch

You use this object to represent the functionality of the Open dialog box.

When processing files, you can complement the functionality of this object model with the FileDialog object and the FileSystemObject object. See further discussion and samples in this chapter.

DocumentProperty

This object represents a built-in or custom property of an Office document. There are up to 28 built-in properties, which include such document attributes as title, author, comments, last print date, last save time, and total editing time. This object also supports custom document properties.

For Word documents, Excel workbooks, and Microsoft PowerPoint presentations only.

NewFile

This object allows you to add and remove entries on the Office Task Pane toolbar.

This object is available with Access, Excel, FrontPage, PowerPoint, and Word applications, but the route for opening the object changes for each application. See further discussion and samples in the chapter.

FileDialog

This object provides a programmatic interface for presenting dialog boxes similar to the File Open and Save As dialog boxes in Microsoft Office.

Available with Access, Word, Excel, and PowerPoint applications.

COMAddin

This is a representation of a COM add-in in Access and other Office host applications.

 

LanguageSettings

This object lets you programmatically return information about language installation, user interface, and help settings.

Tracks locale identifier information when deploying Office internationally.

AnswerWizard

You use this object to programmatically manipulate the Answer wizard.

Includes properties and methods for manipulating files returned by the Answer wizard. This wizard is available exclusively through Microsoft Office XP Developer Edition.

MsoEnvelope

This object lets you send documents as e-mail messages.

For Word documents, Excel charts, and Excel worksheets.

OfficeDataSourceObject

This object represents the data source for a mail merge operation. It offers simplified properties and methods for manipulating a data source for a mail merge.

This object is exclusively for use with Microsoft Publisher, but the Office XP documentation refers to it as part of the Office library.

HTMLProject

This object is a top-level project in the Microsoft Script Editor. You use the HTMLProjectItem collection to track HTML documents within a project.

For Word documents, Excel workbooks, and PowerPoint presentations only.

Script

This object represents a block of script in the Script Editor.

For Word documents, Excel workbooks, and PowerPoint presentations only.

WebPageFont

This object represents the default font when a document is saved as a Web page.

For Word documents, Excel workbooks, and PowerPoint presentations only.