ActivePinMap Property

Returns a PinMap object that represents the active (open) pinmap. (There can be only one active pinmap.) If there's no active pinmap, this property returns "nothing." Read-only.


ActivePinMap Property Example

This example displays the name of the active pinmap on sheet one in a message box.

If Excel.Application.Sheets(1).OLEObjects(1).Object.ActivePinmap Is Nothing Then

    MsgBox "no active pinmap"

else

MsgBox Excel.Application.Sheets(1).OLEObjects(1).Object.ActivePinmap.Name

End If


ActiveTemplate Property

Returns a Template object that represents the active template (the template that's currently attached to the map). There can be only one active template. The only time that this property can return "nothing" is before the map is created. Read-only.


ActiveTemplate Property Example

This example displays the name of the active template for sheet one in a message box.

MsgBox Excel.Application.Sheets(1).OLEObjects(1).Object. ActiveTemplate.Name


Add Method (PinMaps object)
Add Method (PinMaps Collection Object)

Returns the new pinmap as a PinMap object. This method also opens the new pinmap; if there was already an active pinmap, the Add method closes it before opening the new one.

Syntax

expression.Add(Name)

expression   Required. An expression that returns a PinMap object.

Name   Required String. The name of the pinmap. If Name is the name of an existing pinmap, that pinmap is opened. If a pinmap with this name doesn't already exist, a new pinmap is created and given this name.


Add Method (PinMaps Object) Example

This example creates a new, empty pinmap on sheet one and opens it for use.

Excel.Application.Sheets(1).OLEObjects(1).Object.PinMaps.Add "NewPinMapName"


Application Property

Returns the CMSMap object. All objects have an Application property. Read-only.


Application Property Example

This example uses the Application property of a theme object to call the  CMSMap object's  Refresh method, which refreshes the data in all the data sets.

dim theme as object

.

.

.

theme.Application.Refresh


AutoCorrect Property

Determines whether Microsoft Map will attempt to automatically correct spelling mismatches when mapping a dataset. This property applies to all CMSMap objects, not just to the active one. Read/write Boolean.


AutoCorrect Property Example

This example turns on the AutoCorrect feature for the CMSMap object on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.AutoCorrect = True


AutoCreate Property

Determines whether Microsoft Map will create a map based on the selected data when the user inserts a CMSMap object into Microsoft Excel. This property is set to True by default. Read/write Boolean.


AutoCreate Property Example

This example turns off the AutoCreate feature for the CMSMap object that was just added to the active sheet.

Set oleobj = ActiveSheet.OLEObjects.Add(classtype:="MSDatamap.8")

oleobj.Object.AutoCreate = False


Bold Property

Turns bold formatting on or off for a LegendFont object.


Bold Property Example

This example sets the font style for the legend to bold.

legend.Font.Bold = True


Caption Property

Returns or sets the text for a LegendTitle object. Read/write String.


Caption Property Example

This example sets the title and subtitle of the legend.

Legend.Title.Caption = "West Region Sales"

Legend.SubTitle.Caption = "by State"


Close Method

Closes the specified pinmap and removes it from the map. If the pinmap isn't the active pinmap, this method has no effect.  True if the pinmap is successfully closed; False if it isn't.

Syntax

expression.Close

expression   Required. An expression that returns a PinMap object.


Close Method Example

This example closes the active pinmap on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.ActivePinMap.Close


Color Property

Returns or sets the color of a LegendFont object. The color is expressed as a long integer, created by the Microsoft Excel RGB function. Read/write Int32.


Color Property Example

This example sets the font color of the legend for theme one to green.

Themes(1).Legend.Font.Color = RGB(0, 255, 0)


Compact Property

Turns the Compact Legend option on or off for the specified legend object. Read/write Boolean.


Compact Property Example

This example sets the compact legend title for theme one and displays the legend in compact form.

Themes(1).Legend.CompactTitle = "U.S. Sales"

Themes(1).Legend.Compact = True


CompactTitle Property

Returns a LegendTitle object. The compact title is drawn when the Compact property for the Legend object is set to True. Read-only.


CompactTitle Property Example

This example uses the CompactTitle property to return a LegendTitle object, setting "U.S. Sales" as the legend for theme one.

Themes(1).Legend.CompactTitle = "U.S. Sales"

Themes(1).Legend.Compact = True


Count Property

Returns the number of Dataset objects in the Datasets collection. Read-only Int16.


Count Property Example

This example displays the name of each data set in a message box.

for index = 1 to map.Datasets.Count

MsgBox map.Datasets(index).Name

end for


Create Method

Creates a map automatically..  True if the map is created successfully; False if it isn't.

Syntax

expression.Create(Range, KeyField, RefiningField, RefiningValue, Template, DefaultTheme)

expression   Required. An expression that returns a CMSMap object.

Range   Required. Users can also create maps by using the Map command on the Insert menu in Microsoft Excel. The Range argument must be a Microsoft Excel Range object. If this argument is omitted, the current selection is used to create a range. The data set created from the range will become the current data set (see the CurrentDataset property). The fields (columns) in the data set are numbered starting at 1, and the first Microsoft Excel column in the range is numbered 1. For example, if the range is C1:G25, the fields are numbered 1 through 5.

KeyField   Required. Variant. The KeyField argument can be either a field number or a field name that specifies which field to use to match data to a map template. (If you use character values as the first row in your range, the names will be the field names; otherwise, the names are the Microsoft Excel column names.) If this argument is 0 (zero) or left blank, Microsoft Map will try to find a key by using the argument's matching algorithm.

RefiningField   Required. Variant. The RefiningField argument is used if the KeyField column isn't unique. The refining key is used to match data to the refining feature (table) specified in the Map Template definition. (For more information, see DataInstaller.)

RefiningValue   Required. Variant. You can specify a RefiningValue argument if your data doesn't contain both the KeyField and RefiningField columns. For example, if your data has county names (which aren't unique) but not state names (which would be a refining key), you could specify "New York'' as the refining value to limit that data set to matching counties from New York State only.

Template   Required. The Template argument is a Template object from the Templates collection that you can use to identify exactly which map template you want to use. If this argument is omitted, Microsoft Map will try to match the KeyField column with features from all the map templates that are installed.

DefaultTheme   Required. Boolean. If you want to create a default theme for yourself, set the DefaultTheme argument to True.

Remarks

If any of these arguments are omitted, a dialog box may appear, prompting the user to resolve the case where multiple key fields or map templates are found by the matching algorithm.


Create Method Example

This example adds a CMSMap object to the active sheet, sets the object's size, creates a map of North America, and displays a default theme of Sales by State.

' typical create

Sub Create()

Set oleobj = ActiveSheet.OLEObjects.Add(classtype:="MSDatamap.8")

oleobj.Width = 200

oleobj.Height = 150

Dim map As Object

Dim template As Object

Dim rng As Object

Set rng = ActiveSheet.Range("C1:D5")

Set map = oleobj.Object

Set template = map.Templates.Item("North America")

map.Create rng, "State", 0, "", template, True

End Sub

This example adds a CMSMap object to the active sheet, sets the object's size, and creates a map of North America. The example then plots the data on the map of North America, in the Counties and State columns (columns F and G). No default theme is created.

' create using a refiningKey

Sub Create()

Set oleobj = ActiveSheet.OLEObjects.Add(classtype:="MSDatamap.8")

oleobj.Width = 200

oleobj.Height = 150

Dim map As Object

Dim template As Object

Dim rng As Object

Set rng = ActiveSheet.Range("D1:G5")

Set map = oleobj.Object

Set template = map.Templates.Item("North America")

map.Create rng, 3, 4, "", template, False

End Sub


CurrentDataset Property

Returns or sets the data set used when new themes are created. Read/write.


CurrentDataset Property Example

This example displays the current dataset's name in a message box.

MsgBox map.CurrentDataset.Name


Dataset Property

Returns a Dataset object from the Datasets collection. The index can be either the data set name or a number index from 1 through Datasets.Count. This is the default property for data sets. Read-only Variant.


Dataset Property Example

This example displays the name of each data set in a message box.

for index = 1 to map.Datasets.Count

MsgBox map.Datasets.Item(index).Name

end for


Datasets Property

Returns the Datasets collection, which contains all the Dataset objects in the specified map. Read-only.


Datasets Property Example

This example displays the name of each data set in a message box, using the default property (Item) of the Datasets collection.

for index = 1 to map.Datasets.Count

MsgBox map.Datasets(index).Name

end for


Delete Method

Removes the PinMap object from the PinMaps collection and deletes it from the disk. If the pinmap was the active pinmap, it's also removed from the map. True if the PinMap object is deleted successfully; False if it isn't.

Syntax

expression.Delete

expression   Required. An expression that returns a PinMap object.


Delete Method Example

This example removes an unneeded pinmap from sheet one, by name.

Excel.Application.Sheets(1).OLEObjects(1).Object.PinMaps("New Site Locations").Delete


DisplayUnit Property

Returns or sets the unit of measure used in displaying legends for bar and pie chart themes. Can be one of the following values: 0=inch, 1=centimeter, or 2=millimeter. Read/write EnumDisplayUnit.


DisplayUnit Property Example

This example caculates theme sizes for sheet one in centimeters.

Excel.Application.Sheets(1).OLEObjects(1).Object.DisplayUnit=1


Features Property

A collection of all the Feature objects in the specified map. Read-only.


Features Property Example

This example make all map features visible.

for index = 1 to map.Features.Count

map.Features(index).Visible = True

end for


Font Property

Returns the LegendFont object, which can be used to change the appearance of the legend's text. Read/write.


Font Property Example

This example sets the font size for the legend text to 14 points.

map.Themes(1).Legend.Font.Size = 14


IsOpen Method

True if the PinMap object is the open pinmap; False if it isn't.

Syntax

expression.IsOpen

expression   Required. An expression that returns a PinMap object.


IsOpen Method Example

This example makes the active cell bold if pinmap one is open.

if map.PinMaps(1).IsOpen then

ActiveCell.Font.Bold = True

end if


Italic Property

Turns italic formatting on or off for a LegendFont object. Read/write Boolean.


Italic Property Example

This example applies italic formatting to legends.

legend.Font.Italic = True


LatitudeCenter Property

Returns or sets the latitude portions of the center of the specified map. Used together, LatitudeCenter and LongitudeCenter determine what point on the map is displayed in the center of the map window. Read/write Double.


LatitudeCenter Property Example

This example recenters the map on sheet one at Albany, New York, and zooms to a 700-percent view.

Dim map As Object

set map = Excel.Application.Sheets(1).OLEObjects(1).Object

' only redraw after map is at new position (Albany, New York)

map.ScreenUpdating = False

map.LatitudeCenter = -73.79

map.LongitudeCenter = 42.67

map.ZoomPct = 700

map.ScreenUpdating = True


Legend Property

Returns the Legend object of a theme. Read-only.


Legend Property Example

This example sets the legend title and legend subtitle of the first theme in OLE object one on sheet one.

Dim legend As Object

set legend = Excel.Application.Sheets(1).OLEObjects(1).Object.Themes(1).Legend

legend.Title.Caption = "West Region Sales"

legend.SubTitle.Caption = "by State"


LongitudeCenter Property

Returns or sets the longitude portions of the center of the map. Used together, LongitudeCenter and LatitudeCenter determine what point on the map is displayed in the center of the map window. Read/write Double.


LongitudeCenter Property Example

This example recenters the map on sheet one at Albany, New York, and zooms to a 700-percent view.

Dim map As Object

set map = Excel.Application.Sheets(1).OLEObjects(1).Object

' only redraw after map is at new position (Albany, New York)

map.ScreenUpdating = False

map.LatitudeCenter = -73.79

map.LongitudeCenter = 42.67

map.ZoomPct = 700

map.ScreenUpdating = True


MaxSearchTime Property

Returns or sets the amount of time (in seconds) for which Microsoft Map will try to match a data set to the specified map template. This property applies to all CMSMap objects. Read/write Int32.


MaxSearchTime Property Example

This example sets the search time for matching a data set to the specified map template to 20 seconds.

map.MaxSearchTime = 20


Name Property

Returns or sets a data set's name. The default name for a data set created from a Microsoft Excel range is Datasetxxx, where xxx is a sequential number that uniquely identifies the data set. Read/write String.


Name Property Example

This example displays each data set name in a message box.

for index = 1 to map.Datasets.Count

MsgBox map.Datasets(index).Name

end for


Open Method

Opens the PinMap object and makes it the active pinmap. If there was already was an active pinmap, that pinmap is closed before this one is opened. True if the PinMap object is opened successfully; False if it isn't.

Syntax

expression.Open

expression   Required. An expression that returns a PinMap object.


Open Method Example

This example opens a pinmap on sheet one by name.

Excel.Application.Sheets(1).OLEObjects(1).Object.PinMaps("New Site Locations").Open


Parent Property

Returns the specified object's parent object. When applied to the CMSMap object, the Parent property returns the CMSMap object itself, as this object doesn't have a parent. However, every object has a Parent property. Read-only.


Parent Property Example

 This example calls the CMSMap object's Refresh method which will refresh the data in all the datasets.

Excel.Application.Sheets(1).OLEObjects(1).Themes.Parent.Refresh


PinMaps Property

Returns the PinMaps collection, which contains all the PinMap objects that the user has created. Read-only.


PinMaps Property Example

This example displays each pinmap name in a message box.

for index = 1 to map.PinMaps.Count

MsgBox map.PinMaps(index).Name

end for


Refresh Method

Updates the data from all the data sets and redraws any existing themes with the new data. Use this method if you change any data in the range that's being mapped. Don't use this method if you just want to redraw the screen; to do that, use the ScreenUpdating property, set to True.

Syntax

expression.Refresh

expression   Required. An expression that returns a CMSMap object.


Refresh Method Example

This example sets Microsoft Map to reflect all data changes in the displayed themes in the first collection of OLE object on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.Refresh


Remove Method

Removes a field from the specified theme. You can use this method together with the Add method to change the fields (columns) that the theme is based on. True if the field is successfully removed; False if it isn't.

Syntax

expression.Remove

expression   Required. An expression that returns a SelectedField object.


Remove Method Example

This example sets Microsoft Map to base the specified theme on the data in the West field instead of the data in the East field. The example also turns off the redraw feature so that the display is updated only after this task is finished.

Dim Theme As Object

Set Theme = Excel.Application.Sheets(1).OLEObjects(1).Object.Themes(1)

'Change theme to use West data instead of East

'Turn off redraw during operation

Theme.Parent.Parent.ScreenUpdating=False

Theme.SelectFields("East").Remove

Theme.SelectFields.Add("West")

Theme.Parent.Parent.ScreenUpdating=True


ScreenUpdating Property

Turns the redraw feature on or off for the map window. You can use this property to prevent the window from flashing and to save time when making several changes that would automatically cause a redraw. Also, you can set the ScreenUpdating property to True at any time to cause the entire map to be redrawn. Read/write Boolean.


ScreenUpdating Property Example

This example turns off the redraw feature while the specified map is being centering or zoomed.

Dim map As Object

set map = Excel.Application.Sheets(1).OLEObjects(1).Object

' only redraw after map is at new position (Albany, New York)

map.ScreenUpdating = False

map.LatitudeCenter = -73.79

map.LongitudeCenter = 42.67

map.ZoomPct = 700

map.ScreenUpdating = True


SelectedFields Property

Returns the SelectedFields collection, which contains all the SelectedField objects in the specified theme. The SelectedFields collection represents all the fields (columns) from the data set the theme is based on that are being used in the theme. Only a pie chart theme or bar chart theme can have more than one field in the SelectedFields collection. Read-only.


SelectedFields Property Example

This example displays the name of each field in the data set associated with the theme one in a message box.

Dim Theme As Object

Set Theme = Excel.Application.Sheets(1).OLEObjects(1).object.Themes(1)

for index = 1 to Theme.SelectedFields.Count

MsgBox Theme.SelectFields(index).Name

end for


Size Property

Returns or sets the font size for legend entries, in points. Read/write Int16.


Size Property Example

This example makes the font size 12 points for the theme's legend entries.

Theme.Legend.Font.Size=12


Strikethrough Property

Turns the strikethrough formatting on or off for legend entries. Read/write Boolean.


Strikethrough Property Example

This example turns the strikethrough formatting on for the theme's legend entries.

Theme.Legend.Font.Strikethrough=True


SubTitle Property

Returns a SubTitle object for the specified map, which can be used to change the subtitle, hide it, or make it visible. Read-only.


SubTitle Property Example

This example hides the subtitle of the map one on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.SubTitle.Visible=False


Templates Property

Returns the Templates collection, which contains all the available map templates. Read-only.


Templates Property Example

This example displays each template name in a message box.

for index = 1 to map.Templates.Count

MsgBox map.Templates(index).Name

end for


Themes Property

 Returns the Themes collection, which contains all the Theme objects that the user has created. Read-only.


Themes Property Example

This example hides all bar chart themes in map one on sheet one.

Dim Themes As Object

Set Themes = Excel.Application.Sheets(1).OLEObjects(1).Object.Themes

'hide all bar chart themes

for index = 1 to Themes.Count

If Themes(index).Type = 1 Then

Themes(index).Visible = False

end if

end for


ThoroughMatch Property

Returns or sets the state of the ThoroughMatch option. True if all the rows in a data set will be used to try to match the data set to a map template; False if only a sample of the rows will be used for this purpose. This property applies to all CMSMap objects. Read/write Boolean.


ThoroughMatch Property Example

This example turns on thorough matching for map one on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.ThoroughMatch = True


Title Property

Returns the specified map's Title object, which can be used to change the title, hide it, or make it visible. Read/write.


Title Property Example

This example makes the title of map one on sheet one bold.

Excel.Application.Sheets(1).OLEObjects(1).Object.Title.Font.Bold = True


Type Property

Returns the type of the specified theme. This property is set automatically when a theme is created. The possible values are listed in the following table. Read-only EnumThemeType.

Type	Value
Ranged	0
Bar	1
Pie	2
Graduated	3
DotDensity	4
Individual	5
Default	6 (used only when adding a theme by using Themes.Add)


Type Property Example

This example hides all bar chart themes in map one on sheet one.

Dim Themes As Object

Set Themes = Excel.Application.Sheets(1).OLEObjects(1).Object.Themes

'hide all bar chart themes

for index = 1 to Themes.Count

If Themes(index).Type = 1 Then

Themes(index).Visible = False

end if

end for


Underline Property

Turns underlining on or off for legend entries. Read/write Boolean.


Underline Property Example

This example underlines all legend entries.

legend.Font.Underline = True


UseCurrencyFormat Property

Returns or sets the UseCurrentyFormat property of a Legend object, which determines whether the legend's entries are displayed using the current currency formatting. Read/write Boolean.


UseCurrencyFormat Property Example

This example displays currency formating next to legend entries.

legend.UseCurrencyFormat = True


Version Property

Returns the software version number. Read-only String.


Version Property Example

This example prints the software version number in a message box.

MsgBox Excel.Application.Sheets(1).OLEObjects(1).Object.Version


Visible Property

Returns or sets the visibility of the specified map feature. Read/write Boolean.


Visible Property Example

This example makes the "US Cities" feature  visible map one on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.Features("US Cities").Visible = True


XPos Property

Returns or sets the horizontal position of the specified legend, in screen coordinates. Read/write Int16.


XPos Property Example

This example moves the legend up and over to the left.

Theme.Legend.Xpos = Theme.Legend.Xpos - 10

Theme.Legend.Ypos = Theme.Legend.Ypos - 10


YPos Property

Returns or sets the vertical position of the specified legend, in screen coordinates. Read/write Int16.


YPos Property Example

This example moves the legend up and over to the left.

Theme.Legend.Xpos = Theme.Legend.Xpos - 10

Theme.Legend.Ypos = Theme.Legend.Ypos - 10


ZoomPct Property

Returns or sets the specified map's current zoom level, as a percentage (100 percent is the level at which the entire map is visible; this is equivalent to choosing Entire Map from the View menu). Read/write Int32.


ZoomPct Property Example

This example zooms the specified map on the active sheet to 250 percent.

ActiveSheet.OLEObjects(1).Object.ZoomPct = 250


ZoomTo Method

This method allows you to change the zoom percentage and the centering of the specified map in one call without having to use the ZoomPct, LatitudeCenter, or LongitudeCenter properties. It will cause the screen to be redrawn only once.

Syntax

expression.ZoomTo( ZoomPct, Latitude, Longitude)

expression   Required. An expression that returns a CMSMap object.

ZoomPct  Required. Int32. Returns or sets the specified map's current zoom level, as a percentage (100 percent is the level at which the entire map is visible; this is equivalent to choosing Entire Map from the View menu).

Latitude  Required. Double. Returns or sets the latitude portions of the center of the specified map.

Longitude  Required. Double. Returns or sets the longitude portions of the center of the map.


ZoomTo Method Example

This example recenters the specified map on sheet one at Albany, New York, and zooms to a 700-percent view.

Dim map As Object

set map = Excel.Application.Sheets(1).OLEObjects(1).Object

' 2 ways to do the same thing

'first way

map.ZoomTo(700,-73.70, 42.67)

This example redraws the map only after it's been moved to its new position (Albany, New York).

map.ScreenUpdating = False

map.LatitudeCenter = -73.79

map.LongitudeCenter = 42.67

map.ZoomPct = 700

map.ScreenUpdating = True


CMSMap Object

Represents a data-mapping application object. You get a CMSMap object through the Object property of an OleObject object. All other data-mapping objects have an Application property that returns this object.

The following example defines the variable map as an object, assigns the data-mapping object on the active sheet to the variable map, and then sets the map's title caption to "United States."

Dim map As Object

Set map = ActiveSheet.OLEObjects(1).Object

map.Title.Caption = "United States"


Dataset Object

Represents a dataset (range of cells) used to create a map. You can create a Dataset object and add it to the Datasets collection in one of three ways:

•	After using the Create method on the CMSMap object, use a Microsoft Excel Range object to create and map a dataset.

•	In Microsoft Excel, select a range of cells, and then click Map on the Insert menu. This creates the map, creates the dataset, and then maps the dataset.

•	In Microsoft Map, click Insert and then click External Data. This creates a dataset and adds it to the map.

Microsoft Map uses the current dataset whenever you add or modify themes. For more information, see the CurrentDataset property.


Datasets Collection Object

A collection of Dataset objects that represent all the datasets in the specified map.


Feature Object

Represents one of the features in the specified map. You can use the Feature object to turn any given feature on or off.


Features Collection Object

A collection of Feature objects that represent all the features in the specified map.


Legend Object

Represents the legend of the specified theme.


LegendFont Object

Represents the specified legend's title, subtitle, or text.


LegendTitle Object

Represents the title of the specified legend. The LegendTitle object is similar to the Title object except that the xPos, yPos, and Visible properties aren't available for the LegendTitle object.


PinMaps Collection Object

A collection of PinMap objects that represent all the pinmaps created by the user.


SelectedFields Collection Object

A collection of SelectedField objects that represent all the selected fields in the specified map. These objects represent the fields in a dataset that are being displayed in a theme.


Templates Collection Object

A collection of Template objects that represent all the installed map templates. Use the Data Installer to add, remove, or change map templates.


Theme Object

Represents a theme that's displayed in the specified map. You can use the Theme object to turn a theme on or off, change the data fields being mapped, or manipulate the theme's legend.


Themes Collection Object

A collection of Theme objects that represent all the themes in the specified map.


PinMap Object

Represents a pinmap that you can plot on the specified map. PinMap objects are contained in the PinMaps collection.


Title Object

Represents the title of the specified map. You can use the Title object to change the text of the title, hide it, or make it visible.


Template Object

Represents a map template. You can use the Template object to return the name of the specified template. Template objects are contained in the Templates collection.


TitleFont Object

Represents the font of the specified map title.


SelectedField Object

Represents a field in a dataset that's being displayed in a theme.


Item Property

Returns a particular object from the specified collection. For most objects contained in collections, Item is the default property. The index parameter for the Item property is a Variant argument that can either be a number representing the position of the specified object in the collection, or a string representing the name of the object.

This example shows three ways you can return a particular Template object from the Templates collection.

Dim map As Object

dim MyTemplate as object

set map = Excel.Application.Sheets(1).OLEObjects(1).Object

set MyTemplate  = map.Templates.Item(1)	' get first template

set MyTemplate  = map.Templates(1)	' show use of default property

set MyTemplate  = map.Templates.Item("Canda") 'get template with name of "Canada"


PreferCompactLegends Property

Returns or sets a value that indicates whether Microsoft Map will display the legends of newly created themes in compact format. Read/write Boolean.

This example sets Microsoft Map to create all new themes with full legends for object one on sheet one.

Excel.Application.Sheets(1).OLEObjects(1).Object.PreferCompactLegends = False