Save MXD using absolute path

2222
0
02-02-2011 06:15 AM
BingZhu
New Contributor
I have a tool for ArcMap in VS2008 which add some layers and do some geoprocessing then save it as a mxd file. I need to save the mxd using absolute path. I'm using IMxDocument.RelativePaths = False, but after the save, the mxd changed back to use relative path.

This seems very straight forword. But what did I do wrong?



Private Function SetupWorkingMXD()
           m_aoMXDoc.RelativePaths = False        'm_aoMXDoc is a class variable and from IApplication.Document

           'add layers and do geoprocessing like buffer

            Dim strWorkingMXD As String = WorkingFolder & "\test.mxd"
            m_aoApp.SaveAsDocument(strWorkingMXD)
End Function
0 Kudos
0 Replies