mattvb
10-14-2016, 06:09 PM
Hi,
I'm wondering if it is possible to check the number of words in a sentence in PowerPoint?
I'm using this code to do so in Word and would like to do the same in PowerPoint, but from what I've read this may not be possible:
Sub HighlightLongSentences()
Dim oSent As Range
Dim Count As Integer
Dim Words As Integer
Count = 0
Words = 20
For Each oSent In ActiveDocument.Sentences
If oSent.ComputeStatistics(wdStatisticWords) > Words Then
oSent.HighlightColorIndex = wdYellow
Count = Count + 1
End If
Next
MsgBox "This document contains " & Count & " sentence/s that have more than " & _
Words & " words."
End Sub
I tried using the 'Create Handouts > Outline Only' option in PowerPoint to get the text into a word document, but this only grabs text that from placeholders.
So... two questions:
1. Is there a way to get all text (e.g. from placeholders, text boxes, shapes, notes etc) and export it to Word?
2. Or a way to highlight sentences in PowerPoint that are over a certain length?
Thanks,
Matt
I'm wondering if it is possible to check the number of words in a sentence in PowerPoint?
I'm using this code to do so in Word and would like to do the same in PowerPoint, but from what I've read this may not be possible:
Sub HighlightLongSentences()
Dim oSent As Range
Dim Count As Integer
Dim Words As Integer
Count = 0
Words = 20
For Each oSent In ActiveDocument.Sentences
If oSent.ComputeStatistics(wdStatisticWords) > Words Then
oSent.HighlightColorIndex = wdYellow
Count = Count + 1
End If
Next
MsgBox "This document contains " & Count & " sentence/s that have more than " & _
Words & " words."
End Sub
I tried using the 'Create Handouts > Outline Only' option in PowerPoint to get the text into a word document, but this only grabs text that from placeholders.
So... two questions:
1. Is there a way to get all text (e.g. from placeholders, text boxes, shapes, notes etc) and export it to Word?
2. Or a way to highlight sentences in PowerPoint that are over a certain length?
Thanks,
Matt