ActiveDocument

Property of IApplication

Active document object

Read-Only Property of type IDocument

JavaScript

var pDocument = Application.ActiveDocument;

Visual Basic Script

pDocument = Application.ActiveDocument

C++

CComPtr<IDocument> pDocument;
HRESULT hr = Application.get_ActiveDocument(&pDocument);