The following code was in my "ThisDocument" in VBA. I've exported it to it's own .NET Class. How do I set pMxdoc to my Arcmap session in the code - it has null value for now?
This is what I do to replace the ThisDocument VBA lines... Replace this (or similar) from VBA:Dim pMxDoc As IMxDocument
Set pMxDoc = ThisDocument
With this in .Net:Dim pDoc As IDocument = m_application.Document
Dim pMxDoc As IMxDocument = CType(pDoc, IMxDocument)
It might not be the right/best way to do it, but it's worked for me everytime I've used it. HTHMike.