Could you post your thoughts on that, please, Dave, I've included most of my code below. While purging the history works OK, the filesize of the workbook isn't affected and sometimes even grows (!). I'm getting a bit cheesed off with this, it should be very simple but the protectsharing method just doesn't seem to work properly...
Public Sub OpenSub()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Workbooks.Add
Windows(1).Caption = "Destination"
Do Until Worksheets.Count = UBound(FileNameArray)
Worksheets.Add After:=ActiveWorkbook.Worksheets(Worksheets.Count)
Loop
x = 0
For Each ws In ActiveWorkbook.Worksheets
x = x + 1
ws.Name = FileNameArray(x)
ws.Activate
FullName = DirectoryName & PathNameArray(x) & FileNameArray(x) & EndName
If FileDateTime(FullName) > #3/11/02 12:30:00 PM# Then
Workbooks.Open FileName:=FullName
'Windows(FileNameArray(x) & EndName).Activate
With ActiveWorkbook
.HighlightChangesOptions When:=xlAllChanges
.ListChangesOnNewSheet = True
.HighlightChangesOnScreen = False
.Worksheets("History").Select
End With
Columns("A:K").Select
Selection.Copy
Windows("Destination").Activate
ActiveSheet.Paste
Windows(FileNameArray(x) & EndName).Activate
Application.CutCopyMode = False
'ActiveWorkbook.UnprotectSharing
'ActiveWorkbook.Save
'ActiveWorkbook.ProtectSharing
ActiveWorkbook.PurgeChangeHistoryNow days:=1, sharingPassword:=myPass
ActiveWorkbook.Close True
Else:
ws.Range("A1").Value = "No change history found."
End If
Windows("Destination").Activate
Next ws
End Sub