Using OUTPUTTO and saving to folder for backup

J

Jmiller

I am trying to use outputto to send a snapshot of my report to another
server/folder for a backup. How do I bypass to get Yes to auto reply when
promp another file by the same name already exists?

Thank you
j Miller
 
S

Steve Schapel

J Miller

As far as I know, this can't be done with a macro. You could test in a
macro Condition for the existence of the other file, but that won't help
in this instance where you want to overwrite. One option is to use a
unique name for each snapshot file, for example by including the current
date in the filename. Otherwise, you would be able to use the Kill
method in a VBA procedure to delete the existing file before trying to
output your snapshot.
 
S

SusanV

I have a few macros for generating weekly and monthly reports, and that
drove me nuts too. However, I found that they don't prompt the overwrites at
all as long as I use the full UNC - \\server\share\folder\filename.snp

Changing the output path to a mapped drive like W:\folder\filename.snp
generates the warning. Changing it back to full UNC it will still generate a
warning until you compact and repair. No more warnings after that. You might
want to also add a MsgBox notifying users about the auto-overwrite though...

--
hth,
SusanV
 

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

Top