Export report to pdf via vba through task sheduler

jja

Registered User.
Local time
Today, 08:17
Joined
Jul 28, 2010
Messages
15
Hi,
I have a nasty problem that i can't resolve. I can't get tasksheduler to complete the export task. I want nightly to export some reports to pdf but the task sheduler for some reason starts the task and is not anle to finish it. If i run the Bat file manualy from the same server where i create sheduled task - all is ok.
I can't also get any logs generetad. I believe this is something with vba code that exports to pdf because i have almost the same code for exporting spreadheet and it works fine.

Here is my code which generates pdf:
Code:
Public Function exp110pg()
DoCmd.OutputTo acOutputReport, "110_qryResultsPG", acFormatPDF, "\\sanilvfil1\Data\General info\Reports\LT\PG\110_PG" & Format(Date, "yyyymmdd") & ".pdf"
End Function

Here is my bat file:
Code:
@echo off 
cls
"C:\Program Files\Microsoft Office\OFFICE14\MSACCESS.EXE" "\\sanilvfil1\Program\Apps\SaleBase\SaleBasePGv01.mdb"/x  test1


Can anybody advice me what is wrong?
 

Users who are viewing this thread

Back
Top Bottom