I have an access database and a report in that database. I am using the access.application comobject to gain access to access, i.e.
$db = New-Object -ComObject Access.Application
$db.OpenCurrentDatabase("foo.accdb")
This works fine. However, as suggested in another similar question I am unable to get the report out of the db by using the DoCmd.OutputTo method.
$db.DoCmd.OutputTo(3,"The_Report","acFormatPDF","C:\The_Report.PDF")
When I execute that above command, and error returns stating that:
Exception calling "OutputTo" with "4" argument(s): 'The format in which you are attempting to output the current object is not available."
I have ensured that the "save to pdf" add-on is installed. Beyond that, I am unable to figure out what is stopping this object from being output in the requested format. Am I missing something?