Turn Document Thumbnail Off

Created:12/6/2001
Description:

By default, ArcGIS documents will store a preview image of the map or scene within them when saved. This is a feature which is allows you to preview the document in ArcCatalog as a small thumbnail image. This macro will set the property of the document to not store the image. The intent of this sample is to demonstrate the programmatic interaction with the document properties.

How to use:
  1. Copy and paste the following code into an ArcMap or ArcScene VBA session and call the macro 'TurnDocThumbnailOff'.
'
'   set the document property to not maintain a preview image of the map
'
Public Sub TurnDocThumbnailOff()
    
  On Error GoTo TurnDocThumbnailOff
  If TypeOf Application.Document Is ISxDocument Then
      Dim pSxDoc As ISxDocument
      Set pSxDoc = Application.Document
      pSxDoc.SavePreview = False
      
  ElseIf TypeOf Application.Document Is IMxDocument Then
      Dim pMxInfo As IDocumentInfo
      Set pMxInfo = Application.Document
      pMxInfo.SavePreview = False
  End If

  Exit Sub
    
TurnDocThumbnailOff:
    Debug.Print "TurnDocThumbnailOff_ERR: " & Err.Description
    Debug.Assert 0
    
End Sub