This macro has been working for the last year. I'm not sure what the heck is going on. It gets to the second last line "Documents.Open strOriginal" which it does complete but stops after doing so. I'm using an ACER laptop now. I have had to change other macros for use on this machine but I can't figure out why this one won't finish. Any ideas? second issue I'm having is that the documents are from a folder that asks if you want to open the document as read only so when it reopens the document it doesn't ask it just opens it as read only. There is no password protection. An help appreciated.
Sub SaveBackUpCopy()
Application.ScreenUpdating = False
Const strPath As String = "C:\Users\useyourownname\Desktop\in process documents\misc\backups\" 'the path to save the copy
Dim lFmt As Long
Dim strOriginal As String
With ActiveDocument
.Save
If .Path = "" Then
MsgBox "The document must be saved first!"
Exit Sub
End If
lFmt = .SaveFormat
strOriginal = .FullName
'.AcceptAllRevisions
.TrackRevisions = False
With ActiveWindow.View.RevisionsFilter
.Markup = wdRevisionsMarkupNone
.View = wdRevisionsViewFinal
With ActiveDocument
.Save
End With
End With
.SaveAs2 FileName:=strPath & Chr(32) & .Name, _
fileFormat:=lFmt, _
AddToRecentFiles:=False
.Close 0
End With
Documents.Open strOriginal
Application.ScreenUpdating = True
End Sub