I can't seem to get the following to work properly. I'm running it from the template attached to oDoc, trying to save newDoc:
<code>
Documents(newDoc).Activate
With Dialogs(wdDialogFileSaveAs)
.Name = strName
If .Show <> 0 Then
oDoc.Close (wdDoNotSaveChanges)
Else
Windows(oDoc).Visible = True
End If
End With
</code>
The code works OK, except when the filename already exists, in which case I can press "Save" all day, but not get the prompt to ask if I want to overwrite. Save As works fine from the File menu in newDoc, or from the dialog, if I tender a non-existent filename. Any ideas on how to get the overwrite prompt to appear?
thanks
Alan



