Save word document with a new version number using VBA
Hi everyone
I would like to create a macro using Word VBA to save a new version of the document I am working on.
If it is a new document, that hasn't yet been saved, I would like an input box to ask for a name for the file.
The document should then be saved with that file name and add a version number (e.g. V1.0) and the current date (in the format dd.mm.yyyy).
It should look like "Test - V1.0 - 01.01.24".
The user should be prompted to select a folder to save the document.
If the document already has been saved and named, I would like to be able to:
(a) save a minor version update with the version number increasing by 0.1 and to update the date e.g. "Test - V1.1 - 02.01.24"; and
(b) save a major version update with the version number increasing to the next whole number and to update the date e.g. "Test - V2.0 - 03.01.24".
The document should save into the existing folder in that format.
Does anyone know how to achieve that?
I've been trying all morning by searching forums and getting ideas from Copilot but haven't been able to figure it out.
|