Delete Paragraph PowerPoint VBA.

To delete a paragraph use:DelParagraph

Shape.TextFrame.TextRange.Paragraphs(n).Delete

Where “n” is the paragraph’s number. Starts in one (1).

Another example, this deletes the second paragraph for all shapes in the current slide:

Public Sub DeleteParagraph()
   Dim sld As Slide
   Dim shp As Shape
   Set sld = Application.ActiveWindow.View.Slide
   For Each shp In sld.Shapes
     shp.TextFrame.TextRange.Paragraphs(2).Delete
   Next
End Sub
Advertisements
This entry was posted in PowerPoint and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s