0
votes

How can one find a only content (i.e. text) differences between two powerpoint files?

I use PPT 2013. It has a compare tool, but that also finds all text box movements, animation changes, formatting differences etc., which makes it difficult to see whether there are any text changes.

I need to compare "text only" and display any change in text

Context

My client gives me a PPT file. I will format it (color, font, animation etc.), but I'm not supposed to change any text content. If I delete or insert any content by mistake, I'd like to be able to detect that, so I can revert it.

1

1 Answers

0
votes

In PowerPoint 2013 you can export the PowerPoint file content to word or a pdf file which you can then use to compare only the text changes:

  • choose File> Export, Create Handouts, then click the Create Handouts button.

    In the dialog box that opens, choose the Outline Only option and click OK. Word opens with your text.

Update:

You can run this VBS script to extract the text to a text file then you can compare the two files.

It comes from the tool Beyond Compare 4 which can be downloaded as a trial edition. Download the Additional File Formats for PowerPoint files as well if you just want to compare the text changes from the tool.

' PPT_to_TXT.vbs
'
' Extracts plain text from a PowerPoint document.  Requires Microsoft PowerPoint.
' Usage:
'  WScript PPT_to_TXT.vbs <input file> <output file>

Option Explicit

' MsoAutomationSecurity
Const msoAutomationSecurityForceDisable = 3
' OpenTextFile iomode
Const ForAppending = 8

Dim App, AutoSec, Doc, FileSys
Set FileSys = CreateObject("Scripting.FileSystemObject")
If FileSys.FileExists(WScript.Arguments(1)) Then
    FileSys.DeleteFile WScript.Arguments(1)
End If
Set App = CreateObject("Powerpoint.Application")

On Error Resume Next

App.DisplayAlerts = False
AutoSec = App.AutomationSecurity
App.AutomationSecurity = msoAutomationSecurityForceDisable
Err.Clear

Dim Comment, Shape, Slide, TgtFile
Set Doc = App.Presentations.Open(WScript.Arguments(0), True, , False)
If Err = 0 Then
    Set TgtFile = FileSys.OpenTextFile(WScript.Arguments(1), ForAppending, True)
    For Each Slide In Doc.Slides
        For Each Shape In Slide.Shapes
            If Shape.HasTextFrame Then
                If Shape.TextFrame.HasText Then
                    TgtFile.WriteLine Shape.TextFrame.TextRange.Text
                End If
            End If
        Next
        For Each Shape In Slide.NotesPage.Shapes
            If Shape.HasTextFrame Then
                If Shape.TextFrame.HasText Then
                    TgtFile.WriteLine Shape.TextFrame.TextRange.Text
                End If
            End If
        Next
        For Each Comment In Slide.Comments
            TgtFile.WriteLine Comment.Author & vbTAB & Comment.DateTime & vbTAB & Comment.Text
        Next
    Next
    TgtFile.Close
    Doc.Close
End If

App.AutomationSecurity = AutoSec
App.Quit