Hi all, I use a SaveAs in some code. I want the SaveAs to warn me when the export file exist and is being overwritten. So, I want the message "A file named 'xxxx'already exists in this location. Do you... etc" if necessary I do not want the message: "Do you want to save the changes you made to" When I use: Application.DisplayAlerts = False I switch off both. Is there a way to prevent the second message by setting a property or something like that? Thanks! -- Message posted via http://www.officekb.com
You should be able to determine how to do that from the code in the article "How to save a document using a filename that gets incremented by 1 each time if the filename already exists" at: http://www.word.mvps.org/FAQs/MacrosVBA/SaveIncrementedFilename.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Michiel via OfficeKB.com" <u40062@uwe> wrote in message news:8173043767adf@uwe... > Hi all, > > I use a SaveAs in some code. > > I want the SaveAs to warn me when the export file exist and is being > overwritten. So, > I want the message "A file named 'xxxx'already exists in this location. Do > you... etc" > if necessary > > I do not want the message: "Do you want to save the changes you made to" > > When I use: Application.DisplayAlerts = False I switch off both. > > Is there a way to prevent the second message by setting a property or > something like that? > > Thanks! > > -- > Message posted via http://www.officekb.com >