ACC: How to Create a MS Office Binder Using Automation

Last reviewed: December 16, 1997
Article ID: Q148859
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SUMMARY

Advanced: Requires expert coding, interoperability, and multiuser *skills.

This article shows you how to create a Microsoft Office Binder that includes documents from a variety of Microsoft Office programs.

This article assumes that you are familiar with Visual Basic for Applications and with creating Microsoft Access applications using the programming tools provided with Microsoft Access. For more information about Visual Basic for Applications, please refer to your version of *the "Building Applications with Microsoft Access" manual.

MORE INFORMATION

To create a Microsoft Office Binder, add a command button to a *Microsoft Access form, and set the following properties. When the command button *is selected, a new binder called Mybind.obd will be created in the C:\My Documents folder.

   Name: cmdOLEBinder
   Caption: Create Binder
   OnClick: [Event Procedure]

Set the command button's OnClick property to the following event procedure:

   Private Sub cmdOLEBinder_Click()
       Dim boObj As Object, boSec As Object
       Set boObj = CreateObject("Office.Binder")
       boObj.Visible = True
       boObj.Sections.Add ("Word.Document")
       boObj.Sections.Add ("Excel.Sheet")
       boObj.Sections.Add ("PowerPoint.Show")
       boObj.SaveAs FileName:="Mybind.obd"
       Set boObj = Nothing
   End Sub

REFERENCES

For more information about Automation, search the Help Index for "Automation," or ask the Microsoft Access 97 Office Assistant.

For more information on how to use Automation with the Office Binder, open VBABDR8.HLP (the VBA help file for the Office Binder). This file is located within the following folder on the Office 97 installation CD:

   ValuePack\MoreHelp
Keywords          : kbinterop IntpOleA
Technology        : kbole
Version           : 7.0 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: December 16, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.