Freetutes.com

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

You are here: Visual Basic > Advanced VB6 tutorial > Chapter 14

Sponsored Links

Navigating the Container App's Object Model

If the container for your Active Document is an application such as Office Binder that isn't Internet-aware, then you must use the features of the container's object model that enable you to open documents. You will need to use the container application's documentation to discover how to do this, or you might be able to get this information using the Object Browser.

Office Binder, for instance, has an object model whose top element is known as "Binder." The Binder object contains a collection of sections, and each Section object corresponds to an open document. To add a new document, you must call the Add method of the Sections collection. Assuming you have a document path and name in the variable strDocName, you could write code like this to open that document when Binder is the container:

UserDocument.Parent.Parent.Sections.Add , strDocName

Note that there's a blank first argument to the Add method. This corresponds to an index, which you allow to assume a default value.

<< Previous | Contents | Next >>

 

 

Home | Link to Us | Partner Links | About Us | Contact Us
Copyright © 2007-2008 Freetutes.com | All Rights Reserved