Original User: abrownHi All,I'm trying to get a reference to the current MXD so I can save it to disk before making a backup copy. I tried the following snippet from inside a BaseCommand class I created.IMapDocument mapDoc = m_application.Document as IMapDocument;
mapDoc.Save(mapDoc.UsesRelativePaths, false);
This is how the ESRI examples show it working, but I get a null reference on mapDoc each time. The MXD is loaded and I can get IMxDocument just fine. I can't save that though, I need IMapDocument.Any thoughts?