Hello,I have active document DOCUMENT_0000000001.cdrI need macro to save active document as DOCUMENT_0000000002.cdrEach run of macro SAVE_AS must save active document with name increased with 1 of active document.
Each activation of the macro should save the active document with the name of the active document incremented by 1.
So, if active document name is DOCUMENT_0000000199.cdr, SAVE_AS macro activation must save active document as DOCUMENT_0000000200.cdr
Greetings!
Now I create SavedAs document nameNext useful code fragment is:For X = 1 To 100'MsgBox Len(X)MsgBox String(10 - Len(X), "0") & XNext2 steps to final code are necessaryHere is code to generate file namesFor X = 1 To 100MsgBox ActiveDocument.FilePath & String(10 - Len(X), "0") & XNext
For X = 1 To 100'MsgBox Len(X)MsgBox ActiveDocument.FilePath & "DOCUMENT_" & String(10 - Len(X), "0") & X & ".cdr"NextFinal phase:I will create 20 files to spend timeFor X = 1 To 20'MsgBox Len(X)'MsgBox ActiveDocument.FilePath & "DOCUMENT_" & String(10 - Len(X), "0") & X & ".cdr"ActiveDocument.SaveAsCopy ActiveDocument.FilePath & "DOCUMENT_" & String(10 - Len(X), "0") & X & ".cdr"Next
It's better to use SaveAsCopy except SaveAs because SaveAsCopy is faster approximately x 2, I thinkGreetings!Thank You for listening. I hope someone writes better code for this job