I am trying to open an mxd in an ESRI ArcMap add-in using vb.net. The user starts with a blank mxd and runs a tool to open an mxd that is stored in a file. The mxd that is opened by the code has some feature layers and some graphics in the layout.
So far I have:
Dim mapdoc As IMapDocument = New MapDocumentClass()
mapdoc.Open("D:\__Test\LockItInPMAV.mxd")
The document opens because I can get its filename via:
MsgBox("Filename: " & mapdoc.DocumentFilename)
However the data view and layout view remain blank, they do not show the contents of the opened file.
How can I get the opened file to display in the current ArcMap session?
Thanks, Luke.