Dear MS Access Expert. Is the below command specific to ACCDB or does it also work if run it in in Access To. Microsoft Access allows us to export access object like table, query,etc to other formats like Excel, PDF, RTF, etc. Using “To” To. I am creating a PDF from access using To acOutputReport, stDocName, acFormatPDF, strPath,,,, acExportQualityPrint I am using.

Author: Faern Zololmaran
Country: Bahamas
Language: English (Spanish)
Genre: Education
Published (Last): 5 April 2009
Pages: 235
PDF File Size: 1.58 Mb
ePub File Size: 15.65 Mb
ISBN: 394-6-54688-773-5
Downloads: 35051
Price: Free* [*Free Regsitration Required]
Uploader: Mikalrajas

Access – “Save as PDF” from VBA / automation

After browsing tons of webpages, my best VBA approach is as follows: All of these do work. I will never share your email with anyone. There are some folders that are protected, because they belong to either another docmd.oktputto or to the operating system, and you would not normally have permission to write to them unless your application was running as an administrator.

You might try manually creating a file with that name in that folder path, to make sure that you can. Thanks for the solution. If that doesn’t work, try changing the folder docmd.outpytto to your Documents folder to which we know you have full permissions. Can anyone help me pls!!!


The following works for me: By continuing to browse this site, you agree to this use. But in most cases, I wouldn’t expect there to be any such problem except on certain folders controlled by the operating system.

DoCmd.OutputTo method (Access)

If you want to output the active object, specify the object’s type for the ObjectType argument and leave this argument blank. Could anybody point me in the direction of a solution?

If you created the folder, you should certainly have permission to save to it. I have the same question 0. After opening the report in preview view, it will stay open, albeit invisible, until you explicitly close it. This line looks wrong: A string expression that’s the full name, including the path, of the file you want to output the object to.

I had the same problem as you. OutputTothe OutputTo -Method will open the report and export aciutputreport. This thread is locked.

Thanks for your post. Tell us about your experience with our site. If you omit this argument, Access prompts you for the output format. Tuesday, September 18, 7: OurputTo line, and check the value of filepath at that point. Sunday, February 21, The Access data is output in the selected format and can be read by any application that uses the same format. I’m not sure I understand what you’re asking, and what exactly doesn’t work.


Mariucci, That worked well for me. When the review is complete, my customer asked that I produce a “report” of just the last review in a format that can be shared with the person who wrote the document. Hope my question is clear.

It requires to create multiple very similar objects reports. OpenReport -Method, the DoCmd. Dirk Goldgar Replied on March 2, It is not obvious how to export a dynamically acoutputrepoort report using this method.