Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Docmd.OutputTo freezes when trying to output to PDF

301 views
Skip to first unread message

musicloverlch

unread,
Jan 20, 2021, 2:08:28 PM1/20/21
to
I am running Access 2016 and when I try to use Docmd.OutputTo it freezes. Apparently, this is a known issue, but I can't find a solution after a long Google search.

This is the code line it freezes on:

DoCmd.OutputTo acOutputReport, "rptAuthorization Formv2", "PDFFormat(*.pdf)", "G:\" & Foldername & "\Documents\Authorization Form.pdf", False, ""

I am running MS Office 2016 Professional Plus. A lot of my research says it occurs when Office 365 is installed at the same time as Office 2016, which is not my configuration.

If you have any ideas on what to try (other than repair, I already did that) then please, please let me know. Thanks!

Laura

Ron Paii

unread,
Jan 21, 2021, 8:22:40 AM1/21/21
to
Started see something like that in 2019. Solved it by previewing the report before outputting it.

Echo False
DoCmd.OpenReport "rptAuthorization Formv2", acViewPreview
DoCmd.SelectObject acReport, "rptAuthorization Formv2"
DoCmd.OutputTo acOutputReport, "rptAuthorization Formv2", acFormatPDF, "G:\" & Foldername & "\Documents\Authorization Form.pdf"
DoCmd.Close acReport, "rptAuthorization Formv2"
Echo True

musicloverlch

unread,
Feb 5, 2021, 3:10:35 PM2/5/21
to
OMG! Thank you!

James

unread,
May 17, 2023, 5:49:05 PM5/17/23
to
Thanks Ron!

I'm in the process of converting a 10-year old Access database from Access 2013 32-bit to Access 365 64-bit and started seeing the same issue (for the most part) as Laura. The main difference is that my process would cause Access to crash. Implementing your steps of previewing the report first looks to have solved it. I noticed in my case it also works w/o the DoCmd.SelectObject step.

James

unread,
May 17, 2023, 5:59:32 PM5/17/23
to
I might add too - that I wasn't experiencing crashes when running Access interactively; it was only when running Access via the command line (for automation) to run a macro that I was having this issue. I guess that is what was throwing me off. But in either case, your steps so far is preventing the crashes from re-occurring.
0 new messages