I used to know how to do this, but I must have lost the code. I tried this:
IMxdContents mxdcontents = mapControl.Map as IMxdContents; IMapDocument doc = new MapDocumentClass(); doc.ReplaceContents(mxdcontents); doc.SaveAs("C:\\test.mxd");
But I got a "data is not ready to complete operation".
How can I save my ArcEngine mapcontrol map as an .mxd?