How do I declare/use DTE

I copied this example out of the microsoft help but am getting compilation errors as the Variables are not defined.


Code:
For d = 1 To DTE.Documents.Count
            If DTE.Documents.Item(d).Saved Then
                DTE.Documents.Item(d).Close()
            End If
Next d
d is easy:
Code:
dim d as integer
but how do I declare DTE?

Can anybody point me in the right direction?