You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: api/PowerPoint.Shape.Export.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ ms.localizationpriority: medium
9
9
---
10
10
11
11
12
-
# Shape.Duplicate method (PowerPoint)
12
+
# Shape.Export method (PowerPoint)
13
13
14
14
Exports a shape, using the specified graphics filter, and saves the exported file under the specified file name.
15
15
@@ -58,7 +58,7 @@ PowerPoint uses the specified graphics filter to save each individual shape. The
58
58
59
59
The _ScaleWidth_ and _ScaleHeight_ parameters are used to scale the exported image size relative to the dimensions of the slide. For example, if a plain 1" square shape is created on a slide, it will measure as 72x72 points in the Object Model. When exported without using any scale factor, the default scale of 1:1 is applied, and PowerPoint will use 96DPI to create a 96x96 pixel image. If a scale factor of 2x is used as shown in example 2 below, the exported image will be 192x192 pixels.
60
60
61
-
If the slide and/or shape is not fully downloaded, this method fails and an error occurs. For more information about the Partial Documents, see[Work with Partial Documents](/office/vba/powerpoint/how-to/work-with-partial-documents.md).
61
+
If the slide and/or shape is not fully downloaded, this method fails and an error occurs. For more information about the Partial Documents, see[Work with Partial Documents](/office/vba/powerpoint/how-to/work-with-partial-documents).
62
62
63
63
When exporting from PowerPoint on macOS, the files must be created in either the Office sandbox folder or the PowerPoint sandbox folder:
Copy file name to clipboardexpand all lines: api/PowerPoint.Shape.md
+12-22
Original file line number
Diff line number
Diff line change
@@ -15,34 +15,32 @@ ms.localizationpriority: medium
15
15
16
16
Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.
17
17
18
-
19
18
## Remarks
20
19
21
-
> [!NOTE]
22
-
> There are three objects that represent shapes: the **Shapes** collection, which represents all the shapes on a document; the **[ShapeRange](PowerPoint.ShapeRange.md)** collection, which represents a specified subset of the shapes on a document (for example, a **ShapeRange** object could represent shapes one and four on the document, or it could represent all the selected shapes on the document); and the **Shape** object, which represents a single shape on a document. If you want to work with several shapes at the same time or with shapes within the selection, use a **ShapeRange** collection.
23
-
>
20
+
> [!NOTE]
21
+
> There are three objects that represent shapes: the **Shapes** collection, which represents all the shapes on a document; the **[ShapeRange](PowerPoint.ShapeRange.md)** collection, which represents a specified subset of the shapes on a document (for example, a **ShapeRange** object could represent shapes one and four on the document, or it could represent all the selected shapes on the document); and the **Shape** object, which represents a single shape on a document. If you want to work with several shapes at the same time or with shapes within the selection, use a **ShapeRange** collection.
22
+
>
24
23
> For an overview of how to work with either a single shape or with more than one shape at a time, see [Work with shapes (drawing objects)](../powerpoint/How-to/work-with-shapes-drawing-objects.md).
25
24
26
25
The following examples describe how to:
27
26
28
27
- Return an existing shape on a slide, indexed by name or number.
29
-
28
+
30
29
- Return a newly created shape on a slide.
31
-
30
+
32
31
- Return a shape within the selection.
33
-
32
+
34
33
- Return the slide title and other placeholders on a slide.
35
-
34
+
36
35
- Return the shapes attached to the ends of a connector.
Each shape is assigned a default name when you add it to the **Shapes** collection. To give the shape a more meaningful name, use the **Name** property. The following example adds a rectangle to _myDocument_, gives it the name Red Square, and then sets its foreground color and line style.
62
58
63
59
```vb
@@ -76,8 +72,6 @@ With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, _
76
72
EndWith
77
73
```
78
74
79
-
<br/>
80
-
81
75
To add a shape to a slide and return a **Shape** object that represents the newly created shape, use one of the following methods of the **Shapes** collection: [Add3DModel](PowerPoint.Shapes.Add3DModel.md), [AddCallout](PowerPoint.Shapes.AddCallout.md), [AddConnector](PowerPoint.Shapes.AddConnector.md), [AddCurve](PowerPoint.Shapes.AddCurve.md), [AddLabel](PowerPoint.Shapes.AddLabel.md), [AddLine](PowerPoint.Shapes.AddLine.md), [AddMediaObject](PowerPoint.Shapes.AddMediaObject.md), [AddOLEObject](PowerPoint.Shapes.AddOLEObject.md), [AddPicture](PowerPoint.Shapes.AddPicture.md), [AddPlaceholder](PowerPoint.Shapes.AddPlaceholder.md), [AddPolyline](PowerPoint.Shapes.AddPolyline.md), [AddShape](PowerPoint.Shapes.AddShape.md), [AddTable](PowerPoint.Shapes.AddTable.md), [AddTextbox](PowerPoint.Shapes.AddTextbox.md), [AddTextEffect](PowerPoint.Shapes.AddTextEffect.md), [AddTitle](PowerPoint.Shapes.AddTitle.md).
82
76
83
77
Use **Selection.ShapeRange** (_index_), where _index_ is the shape name or the index number, to return a **Shape** object that represents a shape within the selection. The following example sets the fill for the first shape in the selection in the active window, assuming that there's at least one shape in the selection.
Use **Shapes.Title** to return a **Shape** object that represents an existing slide title. Use **Shapes.AddTitle** to add a title to a slide that doesn't already have one and return a **Shape** object that represents the newly created title. Use **Shapes.Placeholders** (_index_), where _index_ is the placeholder's index number, to return a **Shape** object that represents a placeholder. If you have not changed the layering order of the shapes on a slide, the following three statements are equivalent, assuming that slide one has a title.
To return a **Shape** object that represents one of the shapes attached by a connector, use the **[BeginConnectedShape](PowerPoint.ConnectorFormat.BeginConnectedShape.md)** or **[EndConnectedShape](PowerPoint.ConnectorFormat.EndConnectedShape.md)** property.
112
102
113
103
To return a **Shape** object that represents the default shape for a presentation, use the **[DefaultShape](PowerPoint.Presentation.DefaultShape.md)** property.
@@ -118,7 +108,6 @@ Use **GroupItems** (_index_), where _index_ is the shape name or the index numbe
118
108
119
109
Use the **[Group](PowerPoint.ShapeRange.Group.md)** or **[Regroup](PowerPoint.ShapeRange.Regroup.md)** method to group a range of shapes and return a single **Shape** object that represents the newly formed group. After a group has been formed, you can work with the group the same way you work with any other shape.
120
110
121
-
122
111
## Methods
123
112
124
113
-[Apply](PowerPoint.Shape.Apply.md)
@@ -128,6 +117,7 @@ Use the **[Group](PowerPoint.ShapeRange.Group.md)** or **[Regroup](PowerPoint.Sh
_expression_ A variable that represents a [TextRange](PowerPoint.TextRange.md) object.
24
22
25
-
26
23
## Parameters
27
24
28
-
29
-
30
25
|Name|Required/Optional|Data type|Description|
31
26
|:-----|:-----|:-----|:-----|
32
27
|_DateTimeFormat_|Required|**PpDateTimeFormat**|A format for the date and time.|
@@ -36,15 +31,11 @@ _expression_ A variable that represents a [TextRange](PowerPoint.TextRange.md) o
36
31
37
32
TextRange
38
33
39
-
40
34
## Remarks
41
35
42
-
The _DateTimeFormat_ parameter value can be one of these **[PpDateTimeFormat](https://learn.microsoft.com/office/vba/api/powerpoint.ppdatetimeformat)** constants.
43
-
44
-
45
-
The _InsertAsField_ parameter value can be one of these **MsoTriState** constants.
46
-
36
+
The _DateTimeFormat_ parameter value can be one of these **[PpDateTimeFormat](powerpoint.ppdatetimeformat.md)** constants.
47
37
38
+
The _InsertAsField_ parameter value can be one of these **MsoTriState** constants.
48
39
49
40
|Constant|Description|
50
41
|:-----|:-----|
@@ -55,7 +46,6 @@ The _InsertAsField_ parameter value can be one of these **MsoTriState** constan
55
46
56
47
This example inserts the date and time after the first sentence of the first paragraph in shape two on slide one in the active presentation.
0 commit comments