Microsoft KB Archive/148859

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

Article ID: 148859

Article Last Modified on 1/19/2007

-

APPLIES TO


 * Microsoft Access 95 Standard Edition
 * Microsoft Access 97 Standard Edition

-



This article was previously published under Q148859



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



SUMMARY
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

