saving Word doc (word 97, word 2000)

I am trying to save a document with a different file name every time i save, but if the document already exists i get a error message. I am using the following code to save the document
With Dialogs(wdDialogFileSaveAs)
.Name = "C:" & ll_cnt & " Draft"
.Show
End With

Re: saving Word doc (word 97, word 2000)

I am sorry i did not explain it right.. If you have the said document open and you try to save it again with the same filename it gives me an error. Also how can i specify to save the activedocument with the code
With Dialogs(wdDialogFileSaveAs)
.Name = "C:" & ll_cnt & " Draft"
.Show
end with
That is how can i specify the above with... endwith to work for the activedocument..

Re: saving Word doc (word 97, word 2000)

By using Dialogs and Show, you give the user the chance to specify the name. It is applied to the active document by definition. If you just want to save the document under another name without user intervention, use

ActiveDocument.SaveAs FileName:="C:" & ll_cnt & " Draft"

If a document of that name already exists, it should be overwritten without error message, unless the document is read-only or open in another application when you try to save it.

Re: saving Word doc (word 97, word 2000)

<P ID="edit" class=small>(Edited by jscher2000 on 03-Sep-03 01:02. Found the thread.)</P>I posted a macro either on this or on the Word board a few weeks back that created a new file each time you save a document. I have to reboot now or I'd look for it in my e-mail archives. See if you can find it.