# Function Reference

# _IEDocGetObj

Given any DOM object, returns a reference to the associated document object

#include <IE.au3>
_IEDocGetObj ( ByRef $oObject )

## Parameters

$oObject | Object variable of an InternetExplorer.Application, Window, Frame or any DOM object

## Return Value

Success: | an object variable pointing to the Document object.
Failure: | sets the @error flag to non-zero.
@error: | 3 ($_IEStatus_InvalidDataType) - Invalid Data Type
@extended: | Contains invalid parameter number

## Remarks

Given any DOM object (e.g. Browser, Window, Frame, iFrame, Document or Document Element) this will return a reference to the associated document object.
It is particularly useful when writing generalized functions when you cannot control the type of object that will be passed in.

## Example

    ; Open a browser to the AutoIt Homepage, get a reference
    ; to the document object and display a document attribute

    #include <IE.au3>
    #include <MsgBoxConstants.au3>

    Local $oIE = _IECreate("http://www.google.com")
    Local $oDoc = _IEDocGetObj($oIE)
    MsgBox($MB_SYSTEMMODAL, "Document Created Date", $oDoc.fileCreatedDate)