• Docmd.OutputTo freezes when trying to output to PDF

    From musicloverlch@21:1/5 to All on Wed Jan 20 11:08:24 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ron Paii@21:1/5 to musicloverlch on Thu Jan 21 05:22:36 2021
    On Wednesday, January 20, 2021 at 1:08:28 PM UTC-6, musicloverlch wrote:
    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

    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From musicloverlch@21:1/5 to All on Fri Feb 5 12:10:31 2021
    OMG! Thank you!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James@21:1/5 to All on Wed May 17 14:48:59 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James@21:1/5 to All on Wed May 17 14:59:26 2023
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)