ACC: How to Use Automation to Create a Microsoft Office Binder

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

Additional query words:

Keywords : kbinterop kbdta AccCon IntpOlea
Version : WINDOWS:7.0,97
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: October 21, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.