macmillanpublishers / Word-template

Macmillan's styles and template
ISC License
4 stars 4 forks source link

Add cancel button to Progress Bar #133

Open ericawarren opened 8 years ago

ericawarren commented 8 years ago
Sub FileRevertToSaved( )
Dim sDocPath As String
Dim sDocFullName As String

sDocFullName = ActiveDocument.FullName
sDocPath = ActiveDocument.Path

If Len(sDocPath) = 0 Then
MsgBox "Can't revert a document that's never been saved."
Exit Sub
End If

If MsgBox("Really revert to last saved version? " & _
"(Can't be undone)", _
vbYesNo) = vbNo Then
Exit Sub
End If

Documents.Open FileName:=sDocFullName, Revert:=True
End Sub