Partager via


CustomerData Interface

Stores information about a customer (such as name, address, telephone number, and so on) or other information in XML form, as a collection of CustomXMLPart objects that are associated with a Microsoft PowerPoint object.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
<GuidAttribute("914934F6-5A91-11CF-8700-00AA0060263B")> _
Public Interface CustomerData _
    Inherits Collection
'Usage
Dim instance As CustomerData
[GuidAttribute("914934F6-5A91-11CF-8700-00AA0060263B")]
public interface CustomerData : Collection

Remarks

You can store customer data in CustomLayout, Master, Presentation, Shape, and Slide objects. You can associate one or more CustomXMLPart objects with the same object.

Note

Customer data persists from one instance to the next in a PowerPoint document only when you save the document in XML file format, as a PowerPoint XML presentation. Customer data does not persist in documents saved in .ppt, .htm, or .mht formats.

There is no user interface associated with customer data in PowerPoint. The only way that you can assign and manipulate customer data is programmatically.

Use the Add method to add a new CustomXMLPart object to the CustomerData collection.

Use the Delete method to delete a CustomXMLPart object from the CustomerData collection.

Use the Item method to get a specific CustomXMLPart object from the collection. Individual items in the collection are represented by GUIDs (globally unique identifiers).

You can use customer data in the same way that you used Tags objects in versions of PowerPoint previous to that in 2007 Microsoft Office system--that is, to associate data with objects. Customer data is more powerful than tags, however, because you can store the data as XML instead of as a simple string.

You can associate customer data in PowerPoint with external data by storing the IDs of custom XML parts in a spreadsheet or database along with the external data.

When you copy an object that contains customer data, the customer data is copied to the new object. PowerPoint creates a new CustomXMLPart object to hold the copied data, because two CustomLayout, Master, Presentation, Shape, or Slide objects can never be associated with the same CustomXMLPart object.

See Also

Reference

CustomerData Members

Microsoft.Office.Interop.PowerPoint Namespace