P
pbreah
hello everyone,
I'm trying to make a "backup" copy of the document before the code
(macro) makes changes in the current document. The macro I made
replaces many things and reformats the document. With this "backup"
copy I can revert back to the original if the user doesn't like the end
result of the macro. In other words an "undo" for all the changes the
macro made.
I thought of going with this approach in saving a backup copy, but if
anyone knows an easier way, I'll be happy to implement it.
My approach was:
Macro-Reformat
save "backup file"
run code that changes the document
End Macro-Reformat
Macro-Undo
retrieve backup document
assign backup document to the current document
delete backup document
End Macro-Undo
Any suggestions or code to accomplish this?
Thanks
I'm trying to make a "backup" copy of the document before the code
(macro) makes changes in the current document. The macro I made
replaces many things and reformats the document. With this "backup"
copy I can revert back to the original if the user doesn't like the end
result of the macro. In other words an "undo" for all the changes the
macro made.
I thought of going with this approach in saving a backup copy, but if
anyone knows an easier way, I'll be happy to implement it.
My approach was:
Macro-Reformat
save "backup file"
run code that changes the document
End Macro-Reformat
Macro-Undo
retrieve backup document
assign backup document to the current document
delete backup document
End Macro-Undo
Any suggestions or code to accomplish this?
Thanks