2

screenshot of errorHaving an issue regullary that I can't export a report to PDF from print preview using Windows 7 & Access 2016. Get the following error: Microsoft Access can't save the output data to the file you've selected

  • The file may be open. If so, close it, and then save the output data to the file again.
  • If you are using a template, check to make sure the template exits.
  • If the file isn't open, chect to make sure that you have enough free disk space.
  • Make sure that the file exists on the path specified.
  • Check to make sure you have permission to write to the specified folder.

Cannot find any issues, except the file doesn't exists but the specific folder does.

Does anyone have a suggestion how to overcome this? This is not even with VBA code, straight from print preview. Any help appreciate

Cubitte
  • 21
  • 3
  • `except the file doesn't exists but the specific folder does` - I don't understand this, which file?, the report? - see this [answer](https://stackoverflow.com/a/46912630/12511801) or try any of the other suggestions found on internet. By any chance, this error occurs in other computers? – Marco Aurelio Fernandez Reyes May 18 '21 at 17:59
  • Tested on another pc, and it works. But just cannot get it to work on the main pc. The worst of all is, it is not even vba, straight from print preview, right click and export. Don't understand why. All the other reports works 100% it is just the pdf report. – Cubitte May 18 '21 at 18:03
  • How the report that generates this error is different from other reports that works? - I know you said it's not vba, but, maybe there's more info you haven't post in your question; also, the PC where it doesn't work had downloaded updates related to access? - I do remember a few years ago, an update corrupted MS access data, then, a quickfix has launched. The printing preview of printing in general is made in a shared folder or any other settings you might consider add or discard for debug this problem? – Marco Aurelio Fernandez Reyes May 18 '21 at 18:11
  • Thanks. Don't have access to that particular PC right now. Will double check tomorrow the folder settings & trusted locations, what updates has been installed. Wondering if Microsoft Save As PDF or XPS has anything to do it? ( Since the exports to excel works 100%) But i think it is not and add-in for office 2016 like in other versions. – Cubitte May 18 '21 at 18:41

2 Answers2

1

The fix

Unticking PDF/A compliant worked to clear the error message in my case.

Report in preview > Office Ribbon > Data {Group} > [PDF or XPS] > [Options ...] > PDF/A compliant: untick > [OK] > Optimize for: Standard (publishing online and printing) > [Publish]

Another workaround

Avoid the "PDF or XPS" command and go via:

Print > Printer Name: Microsoft Print to PDF > [OK] > MyFileName.pdf > [Save]

John Bentley
  • 1,676
  • 1
  • 16
  • 18
  • Unticking "PDF/A compliant" seems to do the trick indeed. However, this is more a workaround than a proper "fix" because I do need the PDF/A compliance... Sadly... – Indigo Dec 20 '22 at 09:06
  • Did the other workaround, which allows PDF/A compliance work? – John Bentley Dec 21 '22 at 10:29
  • Can Microsoft Print to PDF output PDF/A compliant PDF? I couldn't find the option... – Indigo Dec 21 '22 at 14:53
  • By default `Microsoft Print to PDF` outputs "PDF/A-1a" level compliance, without having to set any option. I've verified this via https://avepdf.com/pdfa-validation – John Bentley Dec 23 '22 at 04:52
  • Maybe your file was simple enough to be a valid PDF/A-1a, but I just tested with a complex PDF that we typically use and it does not pass validation (of any PDF/A flavor). On the other hand, the PDF exported as PDF/A does pass PDF/A-3b validation. PDF generated from `Microsoft Print to PDF` seems to advertise PDF 1.7 compatibility (checked with Adobe Acrobat Reader). – Indigo Dec 23 '22 at 12:42
  • "the PDF exported as PDF/A does pass PDF/A-3b validation". Exported from where? – John Bentley Dec 29 '22 at 02:10
  • 1
    Sorry - forgot to reply. For "the PDF exported as PDF/A does pass PDF/A-3b validation", I was referring to the command "Export as PDF or XPS" with the PDF/A option checked. – Indigo Jan 14 '23 at 11:06
0

Out of windows folders advances security, took ownership and subfolders and it seems to work for now. Thanks

Cubitte
  • 21
  • 3