Skip to content

Commit 6a714b5

Browse files
authored
Merge pull request #1768 from MicrosoftDocs/lindalu-update-ppt-shape-object
Update PowerPoint.TextRange.InsertDateTime.md
2 parents b0f8544 + 4c0f77c commit 6a714b5

4 files changed

+20
-41
lines changed

api/PowerPoint.Shape.Export.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.localizationpriority: medium
99
---
1010

1111

12-
# Shape.Duplicate method (PowerPoint)
12+
# Shape.Export method (PowerPoint)
1313

1414
Exports a shape, using the specified graphics filter, and saves the exported file under the specified file name.
1515

@@ -58,7 +58,7 @@ PowerPoint uses the specified graphics filter to save each individual shape. The
5858

5959
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.
6060

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).
6262

6363
When exporting from PowerPoint on macOS, the files must be created in either the Office sandbox folder or the PowerPoint sandbox folder:
6464

@@ -111,6 +111,6 @@ End With
111111

112112
[PageSetup.SlideWidth](powerpoint.pagesetup.slidewidth.md)
113113

114-
[Work with Partial Documents](/office/vba/powerpoint/how-to/work-with-partial-documents.md)
114+
[Work with Partial Documents](/office/vba/powerpoint/how-to/work-with-partial-documents)
115115

116116
[!include[Support and feedback](~/includes/feedback-boilerplate.md)]

api/PowerPoint.Shape.md

+12-22
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,32 @@ ms.localizationpriority: medium
1515

1616
Represents an object in the drawing layer, such as an AutoShape, freeform, OLE object, or picture.
1717

18-
1918
## Remarks
2019

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+
>
2423
> 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).
2524
2625
The following examples describe how to:
2726

2827
- Return an existing shape on a slide, indexed by name or number.
29-
28+
3029
- Return a newly created shape on a slide.
31-
30+
3231
- Return a shape within the selection.
33-
32+
3433
- Return the slide title and other placeholders on a slide.
35-
34+
3635
- Return the shapes attached to the ends of a connector.
37-
36+
3837
- Return the default shape for a presentation.
39-
38+
4039
- Return a newly created freeform.
41-
40+
4241
- Return a single shape from within a group.
43-
42+
4443
- Return a newly formed group of shapes.
45-
4644

4745
## Example
4846

@@ -56,8 +54,6 @@ myDocument.Shapes(1).Flip msoFlipHorizontal
5654
myDocument.Shapes("Rectangle 1").Flip msoFlipHorizontal
5755
```
5856

59-
<br/>
60-
6157
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.
6258

6359
```vb
@@ -76,8 +72,6 @@ With myDocument.Shapes.AddShape(Type:=msoShapeRectangle, _
7672
End With
7773
```
7874

79-
<br/>
80-
8175
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).
8276

8377
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.
@@ -88,8 +82,6 @@ ActiveWindow.Selection.ShapeRange(1).Fill _
8882
.ForeColor.RGB = RGB(255, 0, 0)
8983
```
9084

91-
<br/>
92-
9385
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.
9486

9587
```vb
@@ -106,8 +98,6 @@ ActivePresentation.Slides(1).Shapes(1).TextFrame _
10698
.TextRange.Font.Italic = True
10799
```
108100

109-
<br/>
110-
111101
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.
112102

113103
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
118108

119109
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.
120110

121-
122111
## Methods
123112

124113
- [Apply](PowerPoint.Shape.Apply.md)
@@ -128,6 +117,7 @@ Use the **[Group](PowerPoint.ShapeRange.Group.md)** or **[Regroup](PowerPoint.Sh
128117
- [Cut](PowerPoint.Shape.Cut.md)
129118
- [Delete](PowerPoint.Shape.Delete.md)
130119
- [Duplicate](PowerPoint.Shape.Duplicate.md)
120+
- [Export](PowerPoint.Shape.Export.md)
131121
- [Flip](PowerPoint.Shape.Flip.md)
132122
- [IncrementLeft](PowerPoint.Shape.IncrementLeft.md)
133123
- [IncrementRotation](PowerPoint.Shape.IncrementRotation.md)

api/PowerPoint.TextRange.InsertDateTime.md

+4-16
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,22 @@ f1_keywords:
66
api_name:
77
- PowerPoint.TextRange.InsertDateTime
88
ms.assetid: b1f6c2db-2524-f76e-eee2-8f177b08dcde
9-
ms.date: 06/08/2017
9+
ms.date: 01/12/2024
1010
ms.localizationpriority: medium
1111
---
1212

13-
1413
# TextRange.InsertDateTime method (PowerPoint)
1514

1615
Inserts the date and time in the specified text range. Returns a **TextRange** object that represents the inserted text.
1716

18-
1917
## Syntax
2018

21-
_expression_. `InsertDateTime`( `_DateTimeFormat_`, `_InsertAsField_` )
19+
_expression_. `InsertDateTime`( _DateTimeFormat_, _InsertAsField_ )
2220

2321
_expression_ A variable that represents a [TextRange](PowerPoint.TextRange.md) object.
2422

25-
2623
## Parameters
2724

28-
29-
3025
|Name|Required/Optional|Data type|Description|
3126
|:-----|:-----|:-----|:-----|
3227
| _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
3631

3732
TextRange
3833

39-
4034
## Remarks
4135

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.
4737

38+
The _InsertAsField_ parameter value can be one of these **MsoTriState** constants.
4839

4940
|Constant|Description|
5041
|:-----|:-----|
@@ -55,7 +46,6 @@ The _InsertAsField_ parameter value can be one of these **MsoTriState** constan
5546

5647
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.
5748

58-
5949
```vb
6050
Set sh = Application.ActivePresentation.Slides(1).Shapes(2)
6151

@@ -64,10 +54,8 @@ Set sentOne = sh.TextFrame.TextRange.Paragraphs(1).Sentences(1)
6454
sentOne.InsertAfter.InsertDateTime ppDateTimeMdyy
6555
```
6656

67-
6857
## See also
6958

70-
7159
[TextRange Object](PowerPoint.TextRange.md)
7260

7361
[!include[Support and feedback](~/includes/feedback-boilerplate.md)]

api/TOC.md

+1
Original file line numberDiff line numberDiff line change
@@ -18214,6 +18214,7 @@
1821418214
###### [Cut](PowerPoint.Shape.Cut.md)
1821518215
###### [Delete](PowerPoint.Shape.Delete.md)
1821618216
###### [Duplicate](PowerPoint.Shape.Duplicate.md)
18217+
###### [Export](PowerPoint.Shape.Export.md)
1821718218
###### [Flip](PowerPoint.Shape.Flip.md)
1821818219
###### [IncrementLeft](PowerPoint.Shape.IncrementLeft.md)
1821918220
###### [IncrementRotation](PowerPoint.Shape.IncrementRotation.md)

0 commit comments

Comments
 (0)