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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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 ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top