Song Su,
There may be a way to do this in a macro, but if so I can't find it.
The only way I know is to use VBA procedure instead of macro. That way, you
can test the existence (use Len(Dir(Path&File))) of the file already, and if
it exists, delete it (use Kill method) before OutputTo.
Only other thing you can do is uniquely name the file each time you output,
for example by adding date stamp to the file name.
--
Steve Schapel, Microsoft Access MVP
"Song Su" <(E-Mail Removed)> wrote in message
news:4BC04C10-AF6F-4F06-B38E-(E-Mail Removed)...
> Access 2007 SP2
>
> My macro action 'OutPutTo' has following arguments:
>
> Object Type: Report
> Object Name: rptAutoSubjSU
> Output Format: PDF Format (*.pdf)
> Output File: Summer by Course.pdf
>
> I want to put this macro on Windows schedule task to run unattended.
> How to suppress prompt: "The file already exist. Do you want to replace?"
> on each run?
>
__________ Information from ESET Smart Security, version of virus signature database 4193 (20090626) __________
The message was checked by ESET Smart Security.
http://www.eset.com