none
DoCmd.OutputTo acOutputQuery XLS into Sharepoint Document Library RRS feed

  • Question

  • Hi, I'm stumped. We recently moved from a NAS to Sharepoint document library for file storage. We generate a PDF and an XLS once per day with the following commands. The PDF works fine, drops it into sharepoint almost instantly. The XLS command (or txt, rpf, we tried several other file types) runs, no error, file never appears. These commands work fine on a local network drive but we don't want to map sharepoint as a local network drive. Any ideas why PDF works and nothing else does?

    DoCmd.OutputTo acOutputQuery, "Qry_ABC", acFormatPDF, PrintLocation & NmPrefix & "_ABC.pdf"

    DoCmd.OutputTo acOutputQuery, "Qry_ABC", acFormatXLS, PrintLocation & NmPrefix & "_ABC.xls"

    Thursday, August 22, 2019 7:51 PM

All replies

  • Maybe it's just the path. SharePoint can really muck up a file path with spaces. Can you post an example? It doesn't have to be the actual path, just one structured the same with spaces, hyphens and such.

    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Friday, August 23, 2019 3:37 PM
  • https://mycompanyname.sharepoint.com/VDrive/Shared/Reports/

    Same path for both commands so I don't see how the PDF would work but the XLS wouldn't.

    Friday, August 23, 2019 4:25 PM
  • I hate it when something fails quietly. That makes it so hard to track. Can you export the query manually through the Ribbon?

    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Friday, August 23, 2019 7:51 PM
  • Yep, hell i can even use the same command and export it to C: or V: successfully for any file type. It's just when exporting to sharepoint.
    Friday, August 23, 2019 8:06 PM
  • Well, at least you have it narrowed down to SharePoint. I don't know much about the administrative aspect of SP. Could it be that there is a filter turned on so you only see PDFs?

    Bill Mosca
    www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Friday, August 23, 2019 9:15 PM