Cancel saving document


I have a problem with people opening backup files, then making changes and then saving the backup file.

Problems here mean that next time the original file is opened and saved it overwrites the changes made in the backup fil, plus we end up with files called "Backup_of_backup_of_filename.cdr".

I have created a sub that tells people when they're opening or moving to a tab of a backup file, which is called on the GlobalMacroStorage_WindowActivate event.

Sub checkForBackup(ByVal FileName As String, ByVal FullName As String)

    If Left(FileName, 6) = "Backup" Then

        MsgBox "PLEASE NOTE! You have opened" & vbCrLf & "a backup version of a file." & vbCrLf & vbCrLf & _
                "DO NOT MAKE ANY CHANGES" & vbCrLf & "TO THIS FILE." & vbCrLf & vbCrLf & _
                "ALL BACKUP FILES ARE DELETED" & vbCrLf & "ON A REGULAR BASIS." & vbCrLf & vbCrLf & _
                "Please, close the file and" & vbCrLf & "open the original.", vbCritical + vbOKOnly, "WARNING! - Backup Detected"
    End If

But funnily enough we still have people saving the damn file.

I can catch when people are saving the file using the GlobalMacroStorage_DocumentBeforeSave event, but cannot find a way to cancel the event so that the document can't be saved.

Does anyone know whow to do this?