# Getting Hold of a QlikView Document

## Accessing QlikView Documents from the Outside

QlikView documents can be accessed from outside the QlikView program by means of the Automation interface.

A direct way to access existing documents is to use GetObject.

Example:

Information note This example does not work in VBScript.

`Private Sub OpenAndReload_Click()` `Set QvDoc = GetObject` `("c:\windows\desktop\test.qvw")` `QvDoc.Reload` `End Sub`

## Accessing QV Documents from the Internal Macro Interpreter

When using the internal macro interpreter, the only reference available is the ActiveDocument property of the class Application. All references must be made starting from that point.

Examples:

`Sub Clr` `Set QVDoc = ActiveDocument` `QvDoc.ClearAll(false)` `End sub` `Sub EndQV` `ActiveDocument.Application.Quit()` `End sub`