Print to File

  • Thread starter Thread starter Mike S
  • Start date Start date
M

Mike S

I'm using the generic adobe postscript printer driver and attempting to
print a report to a file. Here's the problem: I don't want my users to
have to specify the file name. Is there a way to specify the file name (or
tell the system to print the report to a file) in VBA.

Not really interested in a pitch for a 3rd party tool here, just looking for
a VBA-based solution (thanks)

-mike
 
Mike:

Unfortunately there is no simple VBA solution for this issue. Unlike other
Office apps, there's no PrintToFile capability in Access as you know. It
takes a whole bunch of api calls to allow that to work, addressing the
Windows printers, ports, Access report properties and the rest.

Although you aren't looking for third party tools, you might look at our
Print To File Manager for Access; its inexpensive and it could save you a
whole bunch of time researching the path outlined above to make it work;
code is available.
 
Hi Mike,

Thanks for your post. According to your description, I understand that you
want to print Access report to file via VBA without entering the
destination file name. If I have misunderstood, please feel free to let me
know.

Based on my research, please try to use the OutputTo action to output the
data in the specified Microsoft Access database object (a datasheet, form,
report, module, data access page) to several output formats. Please check
to see if this action meets your requirements.

For more information regarding OutputTo action, please refer to the
following article:
Actions Grouped by task
http://www.rit.edu/~nffbbu/MacrosA.htm

Thanks for posting in community.

Thank you,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
Back
Top