Need assistance to Save files w/out dialogue box coming up?

B

Brent E

Good afternoon,

I need to know VBA code to save a file (specifically a Word doc), name that
file and overwrite any already existing file w/out save as dialogue box
triggering.

Anybody know a way to do this? Thanks.
 
R

Rick Brandt

Brent E said:
Good afternoon,

I need to know VBA code to save a file (specifically a Word doc), name that
file and overwrite any already existing file w/out save as dialogue box
triggering.

Anybody know a way to do this? Thanks.

Test for the presence of the file and if there delete it before saving the new
one.

If Dir("PathToFile") <> "" Then
Kill "PathToFile"
End If

FileCopy ...
 
Top