Problems creating an MXD thumbnail.

Discussion created by RoboRubik on May 30, 2013
Latest reply on Jul 27, 2015 by Underscore
I would like to create a thumbnail for a map document, but I've run into problems.  I've found two avenues of aproach, but neither works well.

Method 1 opens the MXD with the MapDocumentClass and then saves using IMapDocument.Save(useRelativePaths, createThumbnail).  This method works for simple map documents.  But, any map layers with a transparency setting will not show in the thumbnail.  Their labels will show, but not the features.  For the maps I'm working with, this results in an unrecognizable thumbnail.

Method 2 uses IDocumentPreview.CreatePreview method off of an MxDocumentClass retrieved from the currently open map document in ArcMap.  This method used to work in ArcMap 9 (as long as the document already had a thumbnail).  It does not seem to work in ArcMap 10.  I have tried setting the IDocumentInfo.SavePreview flag to true and flagging the document as dirty before save, but nothing results in a thumbnail saved with the MXD.

I think it should be possible to get this to work, since the CreateThumbnail button in the Map Document Properties dialog works.  Does anyone have some working code?