PowerPoint.ShapeCollection class
Representa la colección de formas.
- Extends
Comentarios
[ Conjunto de API: PowerPointApi 1.3 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml
// Changes the transparency of every geometric shape in the slide.
await PowerPoint.run(async (context) => {
// Get the type of shape for every shape in the collection.
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
shapes.load("type");
await context.sync();
// Change the shape transparency to be halfway transparent.
shapes.items.forEach((shape) => {
if (shape.type === PowerPoint.ShapeType.geometricShape) {
shape.fill.transparency = 0.5;
}
});
await context.sync();
});
Propiedades
| context | Contexto de solicitud asociado al objeto . Esto conecta el proceso del complemento al proceso de la aplicación host de Office. |
| items | Obtiene los elementos secundarios cargados en esta colección. |
Métodos
| add |
Agrega una forma geométrica a la diapositiva. Devuelve un |
| add |
Agrega una forma geométrica a la diapositiva. Devuelve un |
| add |
Cree un grupo de formas para varias formas. |
| add |
Agrega una línea a la diapositiva. Devuelve un |
| add |
Agrega una línea a la diapositiva. Devuelve un |
| add |
Agrega una tabla a la diapositiva. Devuelve un |
| add |
Agrega un cuadro de texto a la diapositiva con el texto proporcionado como contenido. Devuelve un |
| get |
Obtiene el número de formas de la colección. |
| get |
Obtiene una forma con su identificador único. Se produce un error si la forma no existe. |
| get |
Obtiene una forma mediante su índice de base cero en la colección. Se produce un error si el índice está fuera del intervalo. |
| get |
Obtiene una forma con su identificador único. Si tal forma no existe, se devuelve un objeto con una |
| load(options) | Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a |
| load(property |
Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a |
| load(property |
Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a |
| toJSON() | Invalida el método JavaScript |
Detalles de las propiedades
context
Contexto de solicitud asociado al objeto . Esto conecta el proceso del complemento al proceso de la aplicación host de Office.
context: RequestContext;
Valor de propiedad
items
Obtiene los elementos secundarios cargados en esta colección.
readonly items: PowerPoint.Shape[];
Valor de propiedad
Detalles del método
addGeometricShape(geometricShapeType, options)
Agrega una forma geométrica a la diapositiva. Devuelve un Shape objeto que representa la nueva forma.
addGeometricShape(geometricShapeType: PowerPoint.GeometricShapeType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
Parámetros
- geometricShapeType
- PowerPoint.GeometricShapeType
Especifica el tipo de la forma geométrica. Consulte PowerPoint.GeometricShapeType para obtener más información.
- options
- PowerPoint.ShapeAddOptions
Parámetro opcional para especificar las opciones adicionales, como la posición de la forma.
Devoluciones
Forma recién insertada.
Comentarios
[ Conjunto de API: PowerPointApi 1.4 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/shapes.yaml
// This function gets the collection of shapes on the first slide,
// and adds a hexagon shape to the collection, while specifying its
// location and size. Then it names the shape.
await PowerPoint.run(async (context) => {
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
const shapeOptions: PowerPoint.ShapeAddOptions = {
left: 100,
top: 100,
height: 150,
width: 150,
};
const hexagon: PowerPoint.Shape = shapes.addGeometricShape(PowerPoint.GeometricShapeType.hexagon, shapeOptions);
hexagon.name = "Hexagon";
await context.sync();
});
addGeometricShape(geometricShapeType, options)
Agrega una forma geométrica a la diapositiva. Devuelve un Shape objeto que representa la nueva forma.
addGeometricShape(geometricShapeType: "LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
Parámetros
- geometricShapeType
-
"LineInverse" | "Triangle" | "RightTriangle" | "Rectangle" | "Diamond" | "Parallelogram" | "Trapezoid" | "NonIsoscelesTrapezoid" | "Pentagon" | "Hexagon" | "Heptagon" | "Octagon" | "Decagon" | "Dodecagon" | "Star4" | "Star5" | "Star6" | "Star7" | "Star8" | "Star10" | "Star12" | "Star16" | "Star24" | "Star32" | "RoundRectangle" | "Round1Rectangle" | "Round2SameRectangle" | "Round2DiagonalRectangle" | "SnipRoundRectangle" | "Snip1Rectangle" | "Snip2SameRectangle" | "Snip2DiagonalRectangle" | "Plaque" | "Ellipse" | "Teardrop" | "HomePlate" | "Chevron" | "PieWedge" | "Pie" | "BlockArc" | "Donut" | "NoSmoking" | "RightArrow" | "LeftArrow" | "UpArrow" | "DownArrow" | "StripedRightArrow" | "NotchedRightArrow" | "BentUpArrow" | "LeftRightArrow" | "UpDownArrow" | "LeftUpArrow" | "LeftRightUpArrow" | "QuadArrow" | "LeftArrowCallout" | "RightArrowCallout" | "UpArrowCallout" | "DownArrowCallout" | "LeftRightArrowCallout" | "UpDownArrowCallout" | "QuadArrowCallout" | "BentArrow" | "UturnArrow" | "CircularArrow" | "LeftCircularArrow" | "LeftRightCircularArrow" | "CurvedRightArrow" | "CurvedLeftArrow" | "CurvedUpArrow" | "CurvedDownArrow" | "SwooshArrow" | "Cube" | "Can" | "LightningBolt" | "Heart" | "Sun" | "Moon" | "SmileyFace" | "IrregularSeal1" | "IrregularSeal2" | "FoldedCorner" | "Bevel" | "Frame" | "HalfFrame" | "Corner" | "DiagonalStripe" | "Chord" | "Arc" | "LeftBracket" | "RightBracket" | "LeftBrace" | "RightBrace" | "BracketPair" | "BracePair" | "Callout1" | "Callout2" | "Callout3" | "AccentCallout1" | "AccentCallout2" | "AccentCallout3" | "BorderCallout1" | "BorderCallout2" | "BorderCallout3" | "AccentBorderCallout1" | "AccentBorderCallout2" | "AccentBorderCallout3" | "WedgeRectCallout" | "WedgeRRectCallout" | "WedgeEllipseCallout" | "CloudCallout" | "Cloud" | "Ribbon" | "Ribbon2" | "EllipseRibbon" | "EllipseRibbon2" | "LeftRightRibbon" | "VerticalScroll" | "HorizontalScroll" | "Wave" | "DoubleWave" | "Plus" | "FlowChartProcess" | "FlowChartDecision" | "FlowChartInputOutput" | "FlowChartPredefinedProcess" | "FlowChartInternalStorage" | "FlowChartDocument" | "FlowChartMultidocument" | "FlowChartTerminator" | "FlowChartPreparation" | "FlowChartManualInput" | "FlowChartManualOperation" | "FlowChartConnector" | "FlowChartPunchedCard" | "FlowChartPunchedTape" | "FlowChartSummingJunction" | "FlowChartOr" | "FlowChartCollate" | "FlowChartSort" | "FlowChartExtract" | "FlowChartMerge" | "FlowChartOfflineStorage" | "FlowChartOnlineStorage" | "FlowChartMagneticTape" | "FlowChartMagneticDisk" | "FlowChartMagneticDrum" | "FlowChartDisplay" | "FlowChartDelay" | "FlowChartAlternateProcess" | "FlowChartOffpageConnector" | "ActionButtonBlank" | "ActionButtonHome" | "ActionButtonHelp" | "ActionButtonInformation" | "ActionButtonForwardNext" | "ActionButtonBackPrevious" | "ActionButtonEnd" | "ActionButtonBeginning" | "ActionButtonReturn" | "ActionButtonDocument" | "ActionButtonSound" | "ActionButtonMovie" | "Gear6" | "Gear9" | "Funnel" | "MathPlus" | "MathMinus" | "MathMultiply" | "MathDivide" | "MathEqual" | "MathNotEqual" | "CornerTabs" | "SquareTabs" | "PlaqueTabs" | "ChartX" | "ChartStar" | "ChartPlus"
Especifica el tipo de la forma geométrica. Consulte PowerPoint.GeometricShapeType para obtener más información.
- options
- PowerPoint.ShapeAddOptions
Parámetro opcional para especificar las opciones adicionales, como la posición de la forma.
Devoluciones
Forma recién insertada.
Comentarios
addGroup(values)
Cree un grupo de formas para varias formas.
addGroup(values: Array<string | Shape>): PowerPoint.Shape;
Parámetros
- values
-
Array<string | PowerPoint.Shape>
Matriz de identificadores o Shape objetos de forma.
Devoluciones
Objeto Shape que representa el grupo de formas. Utilice la Shape.group propiedad para tener acceso al ShapeGroup objeto del grupo.
Comentarios
[ Conjunto de API: PowerPointApi 1.8 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/group-ungroup-shapes.yaml
await PowerPoint.run(async (context) => {
// Groups the geometric shapes on the current slide.
// Get the shapes on the current slide.
context.presentation.load("slides");
const slide: PowerPoint.Slide = context.presentation.getSelectedSlides().getItemAt(0);
slide.load("shapes/items/type,shapes/items/id");
await context.sync();
const shapes: PowerPoint.ShapeCollection = slide.shapes;
const shapesToGroup = shapes.items.filter((item) => item.type === PowerPoint.ShapeType.geometricShape);
if (shapesToGroup.length === 0) {
console.warn("No shapes on the current slide, so nothing to group.");
return;
}
// Group the geometric shapes.
console.log(`Number of shapes to group: ${shapesToGroup.length}`);
const group = shapes.addGroup(shapesToGroup);
group.load("id");
await context.sync();
console.log(`Grouped shapes. Group ID: ${group.id}`);
});
addLine(connectorType, options)
Agrega una línea a la diapositiva. Devuelve un Shape objeto que representa la nueva línea.
addLine(connectorType?: PowerPoint.ConnectorType, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
Parámetros
- connectorType
- PowerPoint.ConnectorType
Especifica el tipo de conector de la línea. Si no se proporciona, straight se usará el tipo de conector. Vea PowerPoint.ConnectorType para obtener más información.
- options
- PowerPoint.ShapeAddOptions
Parámetro opcional para especificar las opciones adicionales, como la posición del objeto de forma que contiene la línea.
Devoluciones
Forma recién insertada.
Comentarios
[ Conjunto de API: PowerPointApi 1.4 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/shapes.yaml
// This function gets the collection of shapes on the first slide,
// and adds a line to the collection, while specifying its
// start and end points. Then it names the shape.
await PowerPoint.run(async (context) => {
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
// For a line, left and top are the coordinates of the start point,
// while height and width are the coordinates of the end point.
const line: PowerPoint.Shape = shapes.addLine(PowerPoint.ConnectorType.straight, {
left: 400,
top: 200,
height: 20,
width: 150,
});
line.name = "StraightLine";
await context.sync();
});
addLine(connectorType, options)
Agrega una línea a la diapositiva. Devuelve un Shape objeto que representa la nueva línea.
addLine(connectorType?: "Straight" | "Elbow" | "Curve", options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
Parámetros
- connectorType
-
"Straight" | "Elbow" | "Curve"
Especifica el tipo de conector de la línea. Si no se proporciona, straight se usará el tipo de conector. Vea PowerPoint.ConnectorType para obtener más información.
- options
- PowerPoint.ShapeAddOptions
Parámetro opcional para especificar las opciones adicionales, como la posición del objeto de forma que contiene la línea.
Devoluciones
Forma recién insertada.
Comentarios
addTable(rowCount, columnCount, options)
Agrega una tabla a la diapositiva. Devuelve un Shape objeto que representa la nueva tabla. Utilice la Shape.table propiedad para obtener el Table objeto de la forma.
addTable(rowCount: number, columnCount: number, options?: PowerPoint.TableAddOptions): PowerPoint.Shape;
Parámetros
- rowCount
-
number
Número de filas de la tabla. Debe ser 1 o superior.
- columnCount
-
number
Número de columnas de la tabla. Debe ser 1 o superior.
- options
- PowerPoint.TableAddOptions
Proporciona opciones que describen la nueva tabla.
Devoluciones
Forma recién insertada.
Comentarios
[ Conjunto de API: PowerPointApi 1.8 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Adds a basic table.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;
// Add a simple table, specifying the row and column count.
shapes.addTable(3, 4);
await context.sync();
});
addTextBox(text, options)
Agrega un cuadro de texto a la diapositiva con el texto proporcionado como contenido. Devuelve un Shape objeto que representa el nuevo cuadro de texto.
addTextBox(text: string, options?: PowerPoint.ShapeAddOptions): PowerPoint.Shape;
Parámetros
- text
-
string
Especifica el texto que se mostrará en el cuadro de texto creado.
- options
- PowerPoint.ShapeAddOptions
Parámetro opcional para especificar las opciones adicionales, como la posición del cuadro de texto.
Devoluciones
Forma recién insertada.
Comentarios
[ Conjunto de API: PowerPointApi 1.4 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/shapes.yaml
// This function gets the collection of shapes on the first slide,
// and adds a text box to the collection, while specifying its text,
// location, and size. Then it names the text box.
await PowerPoint.run(async (context) => {
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
const textbox: PowerPoint.Shape = shapes.addTextBox("Hello!", {
left: 100,
top: 300,
height: 300,
width: 450,
});
textbox.name = "Textbox";
return context.sync();
});
getCount()
Obtiene el número de formas de la colección.
getCount(): OfficeExtension.ClientResult<number>;
Devoluciones
OfficeExtension.ClientResult<number>
Número de formas de la colección.
Comentarios
[ Conjunto de API: PowerPointApi 1.3 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml
// Gets the table from a shape.
await PowerPoint.run(async (context) => {
const shapes = context.presentation.getSelectedShapes();
const shapeCount = shapes.getCount();
shapes.load("items");
await context.sync();
if (shapeCount.value > 0) {
const shape = shapes.getItemAt(0);
shape.load("type");
await context.sync();
// The shape type can indicate whether the shape is a table.
const isTable = shape.type === PowerPoint.ShapeType.table;
if (isTable) {
// Get the Table object for the Shape which is a table.
const table = shape.getTable();
table.load();
await context.sync();
// Get the Table row and column count.
console.log("Table RowCount: " + table.rowCount + " and columnCount: " + table.columnCount);
} else console.log("Selected shape isn't table.");
} else console.log("No shape selected.");
});
getItem(key)
Obtiene una forma con su identificador único. Se produce un error si la forma no existe.
getItem(key: string): PowerPoint.Shape;
Parámetros
- key
-
string
Identificador de la forma.
Devoluciones
Forma con el identificador único. Si dicha forma no existe, se produce un error.
Comentarios
getItemAt(index)
Obtiene una forma mediante su índice de base cero en la colección. Se produce un error si el índice está fuera del intervalo.
getItemAt(index: number): PowerPoint.Shape;
Parámetros
- index
-
number
Índice de la forma de la colección.
Devoluciones
Forma en el índice especificado. Se produce un error si el índice está fuera del intervalo.
Comentarios
[ Conjunto de API: PowerPointApi 1.3 ]
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/tags/tags.yaml
await PowerPoint.run(async function (context) {
const slide: PowerPoint.Slide = context.presentation.slides.getItemAt(0);
const shape: PowerPoint.Shape = slide.shapes.getItemAt(0);
shape.tags.add("MOUNTAIN", "Denali");
await context.sync();
const myShapeTag: PowerPoint.Tag = shape.tags.getItem("MOUNTAIN");
myShapeTag.load("key, value");
await context.sync();
console.log("Added key " + JSON.stringify(myShapeTag.key) + " with value " + JSON.stringify(myShapeTag.value));
});
getItemOrNullObject(id)
Obtiene una forma con su identificador único. Si tal forma no existe, se devuelve un objeto con una isNullObject propiedad establecida en true. Para obtener más información, vea *OrNullObject methods and properties( Métodos y propiedades de *OrNullObject).
getItemOrNullObject(id: string): PowerPoint.Shape;
Parámetros
- id
-
string
Identificador de la forma.
Devoluciones
Forma con el identificador único. Si tal forma no existe, se devuelve un objeto con una isNullObject propiedad establecida en true.
Comentarios
load(options)
Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.
load(options?: PowerPoint.Interfaces.ShapeCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions): PowerPoint.ShapeCollection;
Parámetros
- options
-
PowerPoint.Interfaces.ShapeCollectionLoadOptions & PowerPoint.Interfaces.CollectionLoadOptions
Proporciona opciones para las propiedades del objeto que se van a cargar.
Devoluciones
load(propertyNames)
Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.
load(propertyNames?: string | string[]): PowerPoint.ShapeCollection;
Parámetros
- propertyNames
-
string | string[]
Una cadena delimitada por comas o una matriz de cadenas que especifican las propiedades que se van a cargar.
Devoluciones
Ejemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/get-shapes-by-type.yaml
// Changes the transparency of every geometric shape in the slide.
await PowerPoint.run(async (context) => {
// Get the type of shape for every shape in the collection.
const shapes: PowerPoint.ShapeCollection = context.presentation.slides.getItemAt(0).shapes;
shapes.load("type");
await context.sync();
// Change the shape transparency to be halfway transparent.
shapes.items.forEach((shape) => {
if (shape.type === PowerPoint.ShapeType.geometricShape) {
shape.fill.transparency = 0.5;
}
});
await context.sync();
});
load(propertyNamesAndPaths)
Pone en cola un comando para cargar las propiedades especificadas del objeto. Debe llamar a context.sync() antes de leer las propiedades.
load(propertyNamesAndPaths?: OfficeExtension.LoadOption): PowerPoint.ShapeCollection;
Parámetros
- propertyNamesAndPaths
- OfficeExtension.LoadOption
propertyNamesAndPaths.select es una cadena delimitada por comas que especifica las propiedades que se van a cargar y propertyNamesAndPaths.expand es una cadena delimitada por comas que especifica las propiedades de navegación que se van a cargar.
Devoluciones
toJSON()
Invalida el método JavaScript toJSON() para proporcionar una salida más útil cuando se pasa un objeto de API a JSON.stringify(). (JSON.stringifya su vez, llama al toJSON método del objeto que se le pasa). Mientras que el objeto original PowerPoint.ShapeCollection es un objeto de API, el toJSON método devuelve un objeto JavaScript sin formato (escrito como PowerPoint.Interfaces.ShapeCollectionData) que contiene una matriz de "elementos" con copias superficiales de las propiedades cargadas de los elementos de la colección.
toJSON(): PowerPoint.Interfaces.ShapeCollectionData;