I have a spreadsheet. I export data from the spreadsheet into a newly created word doc. then i save that word doc in a designated folder.. All this done with a macro within excel.
The issue i have is that sometimes the file name is the same as previously used, so i would like to put a check in there to see if the file already exists and if it does then add a suffix (like how windows does it) e.g. (1) or (2)
this is part of the code I am using
![]()
Please Login or Register to view this content.
This is the part that does the overwriting
![]()
Please Login or Register to view this content.
laymans terms of the code I need help with
How do i make sure that it is not the same as a previously created file? e.g. "(1)"![]()
Please Login or Register to view this content.
Thanks for your help
Bookmarks