You didn't provide the code you're using, so try this:
DocumentClass m_Doc = (DocumentClass)m_App.Documents.Open(FileName: m_strTemplate);
Or in VB.NET:
Dim m_doc as documentclass = DirectCast(m_App.Documents.Open(FileName: m_strTemplate))
EDIT ===========
Corrected Dave Kreskowiak's invalid VB code (check versions to see what I mean).