Microsoft KB Archive/253235

From BetaArchive Wiki

Article ID: 253235

Article Last Modified on 1/11/2005



APPLIES TO

  • Microsoft Excel 2000 Standard Edition
  • Microsoft Visual Basic 5.0 Professional Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 5.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition
  • Microsoft Visual C++ 6.0 Professional Edition
  • Microsoft Foundation Class Library 4.2
  • Microsoft Word 2000 Standard Edition
  • Microsoft Word 97 Standard Edition
  • Microsoft Excel 97 Standard Edition
  • Microsoft PowerPoint 97 Standard Edition
  • Microsoft PowerPoint 2000 Standard Edition
  • Microsoft Access 97 Standard Edition
  • Microsoft Outlook 2000 Standard Edition
  • Microsoft Outlook 97 Standard Edition
  • Microsoft Outlook 98 Standard Edition



This article was previously published under Q253235

SUMMARY

Offautmn.exe is a self-extracting executable that contains a white paper supplemented with sample projects that provide the fundamentals for understanding how to Automate Microsoft Office 97 and Microsoft Office 2000 applications.

The white paper is designed to guide you from the ground up to through creating a variety of fully functional Automation clients. It is structured as a tutorial with a large assortment of sample code and provides tips throughout that facilitate development of your Automation clients. Exercises and sample code are presented for Microsoft Visual Basic, Microsoft C/C++, and Microsoft Foundation Classes (MFC) developers.

MORE INFORMATION

The following file is available for download from the Microsoft Download Center:
[GRAPHIC: Download]Download the OffAutmn.exe package now. For additional information about how to download Microsoft Support files, click the following article number to view the article in the Microsoft Knowledge Base:

119591 How to obtain Microsoft support files from online services


Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help to prevent any unauthorized changes to the file.

Automation

Automation, formerly called OLE Automation, is a technology that allows you to take advantage of an existing program's content and functionality, and to incorporate it into your own applications. Automation is based on the Component Object Model (COM). COM is a standard software architecture based on interfaces that is designed to separate code into self-contained objects, or components. Each component exposes a set of interfaces through which all communication to the component is handled.

With Automation, you can use the Microsoft Word mail merge feature to generate form letters from data in a database without the user being aware that Word is involved. You could even use all of the charting and data analysis functionality that Microsoft Excel provides using Automation. You don't need to write your own calculation engine to provide the multitude of mathematical, financial, and engineering functions that Excel provides; Instead, you can automate Microsoft Excel to "borrow" this functionality and incorporate it into your own application.


Automating Microsoft Office 97 and Office 2000 white paper

The white paper (Offautmn.doc) included in Offautmn.exe is intended to provide you with a foundation for developing your own Automation clients for Microsoft Office applications. A hands-on approach is used to help you with the following:

  • Understand how Office applications expose their content and functionality to Automation clients.
  • Identify the specific functions for the task you choose to Automate.
  • Locate the resources and documentation you need.
  • Understand how Automation works behind the scenes.
  • Create Automation clients with Visual Basic, Visual C++, and MFC.
  • Develop a client that uses the Automation server efficiently.

Each section in the white paper is supplemented with exercises and sample code that you can use to create complete and functional Automation clients for Office applications.

The supplemental projects for the exercises and samples that are included in Offautmn.exe are outlined below:

Project Description                Project Folder
-------------------                --------------

Exercise 2                         ..\VB\Exercise2

Exercise 3                         ..\VB\Exercise3

Using SAFEARRAYs                   ..\C++\SafeArrayDemo

Exercise 4                         ..\C++\Exercise4

Exercise 5                         ..\C++\Exercise5

Exercise 6                         ..\MFC\Exercise6

Exercise 7                         ..\MFC\Exercise7

Exercise 8                         ..\VB\Exercise8

Exercise 9                         ..\MFC\Exercise9

Exercise 10                        ..\VB\Exercise10

Exercise 11                        ..\MFC\Exercise11

Automate Excel to Create and 
Format a New Workbook              ..\VB\ExcelArray
                                   ..\MFC\ExcelArrays
Automate Excel to Add Data from
a DAO Recordset to a Workbook      ..\VB\ExcelData
                                   ..\MFC\ExcelData
Automate Word to Perform a Mail
Merge with Access Data             ..\VB\MailMerge
                                   ..\MFC\MailMerge
Automate PowerPoint to Create
and Run a SlideShow                ..\VB\SlideShow
                                   ..\MFC\SlideShow

Automate an Office Application to
Obtain a Document's Properties     ..\VB\DocProps
                                   ..\MFC\DocProps
                

(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Lori Turner, Microsoft Corporation.



Additional query words: OFFAUTMN CreateDispatch GetActiveObject GetObject CreateObject Controller Invoke GetIDsOfNames Excel PowerPoint Word VB VC CLSID ProgID

Keywords: kbinfo kbdownload kboutlookobj kbfile kbautomation KB253235