' Open Map Document Info Dim theMapDoc As IMapDocument = New MapDocument theMapDoc.Open("TheFileName.mxd") Dim theDocInfo As IDocumentInfo = TryCast(theMapDoc, IDocumentInfo) Dim FileTitle as String = theDocInfo.DocumentTitle
Solved! Go to Solution.
Dim pMapDocument As New ESRI.ArcGIS.Carto.MapDocument pMapDocument.Open("TheFileName.mxd") Dim pDocInfo As ESRI.ArcGIS.Carto.IDocumentInfo2 = TryCast(pMapDocument, ESRI.ArcGIS.Carto.IDocumentInfo2) Debug.Print(pDocInfo.Author.ToString & vbNewLine & pDocInfo.Category.ToString & vbNewLine & pDocInfo.Comments.ToString & vbNewLine & pDocInfo.Credits.ToString & vbNewLine & pDocInfo.DateExported.ToString & vbNewLine & pDocInfo.DatePrinted.ToString & vbNewLine & pDocInfo.DateSaved.ToString & vbNewLine & pDocInfo.DocumentTitle.ToString & vbNewLine & pDocInfo.Folder.ToString & vbNewLine & pDocInfo.HyperlinkBase.ToString & vbNewLine & pDocInfo.Keywords.ToString & vbNewLine & pDocInfo.Name.ToString & vbNewLine & pDocInfo.Path.ToString & vbNewLine & pDocInfo.RelativePaths.ToString & vbNewLine & pDocInfo.SavePreview.ToString & vbNewLine & pDocInfo.Subject.ToString )
Dim pMapDocument As New ESRI.ArcGIS.Carto.MapDocument pMapDocument.Open("TheFileName.mxd") Dim pDocInfo As ESRI.ArcGIS.Carto.IDocumentInfo2 = TryCast(pMapDocument, ESRI.ArcGIS.Carto.IDocumentInfo2) Debug.Print(pDocInfo.Author.ToString & vbNewLine & pDocInfo.Category.ToString & vbNewLine & pDocInfo.Comments.ToString & vbNewLine & pDocInfo.Credits.ToString & vbNewLine & pDocInfo.DateExported.ToString & vbNewLine & pDocInfo.DatePrinted.ToString & vbNewLine & pDocInfo.DateSaved.ToString & vbNewLine & pDocInfo.DocumentTitle.ToString & vbNewLine & pDocInfo.Folder.ToString & vbNewLine & pDocInfo.HyperlinkBase.ToString & vbNewLine & pDocInfo.Keywords.ToString & vbNewLine & pDocInfo.Name.ToString & vbNewLine & pDocInfo.Path.ToString & vbNewLine & pDocInfo.RelativePaths.ToString & vbNewLine & pDocInfo.SavePreview.ToString & vbNewLine & pDocInfo.Subject.ToString )
The IDocumentInfo2 interface exposes much more information.Dim pMapDocument As New ESRI.ArcGIS.Carto.MapDocument pMapDocument.Open("TheFileName.mxd") Dim pDocInfo As ESRI.ArcGIS.Carto.IDocumentInfo2 = TryCast(pMapDocument, ESRI.ArcGIS.Carto.IDocumentInfo2) Debug.Print(pDocInfo.Author.ToString & vbNewLine & pDocInfo.Category.ToString & vbNewLine & pDocInfo.Comments.ToString & vbNewLine & pDocInfo.Credits.ToString & vbNewLine & pDocInfo.DateExported.ToString & vbNewLine & pDocInfo.DatePrinted.ToString & vbNewLine & pDocInfo.DateSaved.ToString & vbNewLine & pDocInfo.DocumentTitle.ToString & vbNewLine & pDocInfo.Folder.ToString & vbNewLine & pDocInfo.HyperlinkBase.ToString & vbNewLine & pDocInfo.Keywords.ToString & vbNewLine & pDocInfo.Name.ToString & vbNewLine & pDocInfo.Path.ToString & vbNewLine & pDocInfo.RelativePaths.ToString & vbNewLine & pDocInfo.SavePreview.ToString & vbNewLine & pDocInfo.Subject.ToString )
The description is given in the Comments property.