Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print to file

Status
Not open for further replies.

CalvinH

Programmer
Joined
Nov 28, 2000
Messages
2
Location
SE
Hi all,
I'm getting quite frustrated over this problem:

How do I 'print to file', in VBA, i.e the equivalent of chosing File - Print - Print to file option and then specifying name and location?

I'm trying to save an Access report in .prn format. I can make the PrintDialog turn up by code, but I want to automate this process without any user input.
Does anyone have any ideas?

Replies will be greatly appreciated! 8-)

/Calvin
 
Did you try to look up Files, Input and Output under Access Help? There are a list of commands used to OPEN a file, PUT data to it and the CLOSE the file.

Using this, you could OPEN the file, PUT your headers, open a Recordset, PUT your data to the file, and then CLOSE the file.

Hope that is a start...

Terry M. Hoey
th3856@txmail.sbc.com

Ever notice that by the time that you realize that you ran a truncate script on the wrong instance, it is too late to stop it?
 
Thanks for your suggestion, will try!

/Calvin :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top