I believe the best thing to do is check if the desired file name already exists in the location you're about to write to with the DIR function.
If it exists, then you can append the file name with "- Copy(1)" to match the windows format. Check again if the file name exists and if it does, try "- Copy(2)" and so on until you get a unique file name.
I hope that helps.
Thank you for your replies
i get the idea now however not sure how to write it in the code
i read that link but still couldn't understand as this is my first macro
if that is my macro code what should i add and where exactly ?
Dim swApp As Object
Dim Part As Object
Dim boolstatus As Boolean
Dim longstatus As Long, longwarnings As Long
Set swApp = Application.SldWorks
Set Part = swApp.ActiveDoc
boolstatus = swApp.SetUserPreferenceIntegerValue(swUserPreferenceIntegerValue_e.swTiffPrintDPI, 200)
boolstatus = swApp.SetUserPreferenceIntegerValue(swUserPreferenceIntegerValue_e.swTiffPrintPaperSize, swDwgPaperSizes_e.swDwgPaperBsize)
' Save As
longstatus = Part.SaveAs3("C:\Users\3aBBaS\Desktop\200.PNG", 0, 0)