HOW TO
In ArcMap, there is a Map Document Properties dialog that shows the following information fields about the .mxd file: Title, Summary, Description, Author, Credits, Tags and Hyperlink base.
The Map Document Properties dialog box
Code:
Dim pMapDoc As IMapDocument = New MapDocument()
pMapDoc.Open("C:\\Untitled.mxd")
Dim pDocInfo As IDocumentInfo2 = pMapDoc
'Change the author of the document
pDocInfo.Author = "Esri"
'Change the title of the document.
pDocInfo.DocumentTitle = "My Map Document"
'Change the description of the document
pDocInfo.Comments = "This is a demo."
'Save the change
pMapDoc.Save()
Code:
IMapDocument pMapDoc = new MapDocument();
pMapDoc.Open("C:\\Untitled.mxd");
IDocumentInfo2 pDocInfo = (IDocumentInfo2) pMapDoc;
//Change the author of the document
pDocInfo.Author = "Esri";
//Change the title of the document.
pDocInfo.DocumentTitle = "My Map Document";
//Change the description of the document
pDocInfo.Comments = "This is a demo.";
//Save the change
pMapDoc.Save();
Code:
IMapDocument pMapDoc = new MapDocument();
pMapDoc.open("C:\\Untitled.mxd", "");
IDocumentInfo2 pDocInfo = (IDocumentInfo2) pMapDoc ;
//Change the author of the document
pDocInfo.setAuthor("Esri");
//Change the title of the document.
pDocInfo.setDocumentTitle ("My Map Document");
//Change the description of the documentpDocInfo.setComments ("This is a demo.");
//Save the change
pMapDoc.save(false, false);
Article ID: 000013269
Get help from ArcGIS experts
Download the Esri Support App