Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1064

Reading UTF-8 texts in PowerPoint via VBA

$
0
0

I want to read all text in a PowerPoint file using VBA.

I write this code:

Sub ReadFileText()    On Error Resume Next    Dim shp As Shape    For Each sld In ActivePresentation.Slides        For Each shp In sld.Shapes             If shp.TextFrame.HasText Then                MsgBox shp.TextFrame.TextRange.Text             End If        Next shp    Next sldEnd Sub

Some shapes includes non-ASCII (UTF-8) characters in text.VBA returns them as "?" character!

How can I read shape text as UTF-8 string?

Power Point Screenshot


Viewing all articles
Browse latest Browse all 1064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>