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!
Whenever you are solving a programming problem, the first step is to break down the problem into smaller problems. For example, in your case:
First, we need to analyze the file name to obtain its numbering.lets break this too:use substring to get numeric part of string string - Substring in VBA - Stack Overflowconverting string to intHow to Convert String to Integer in VBA (With Examples) - Statology Second, how do we increment this numbering? Next, how do we generate the new name?CREATE 100 FILES - CorelDRAW and Corel DESIGNER API - Developer Area - CorelDRAW Community Finally, we save the document.Document.SaveAs method - Developer Area - CorelDRAW Community
Hello,Thank You very much, but not work!I hope to get a more practical working answer. Looking for one as my routines are quite slow. I think there are always better ways.Greetings!BGНадявам се да получа по-практичен работещ отговор. Търся такъв, тъй като моите процедури са доста бавни. Мисля си, че винаги има и по-добри начини.