Simple VBA code to export Access Report to saved PDF File when code is run
<p>I'm looking for a very simple solution here. I simply want a vba script that I can run over and over again to save the same Access report (that changes as the weeks go by) into the same file over and over again. I need it to be the same name each time and don't want to be prompted that the filename is already there. In my research, it feels like the following should work but it does not. Can anyone provide a simple script that performs this task? </p>

<pre><code> Sub program()
 DoCmd.OutputTo acOutputReport, "Employee1",  
 acFormatPDF,"C:\Users\desktop\PDFs\Report1.pdf"
 End Sub
</code></pre>