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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a file from within access

Status
Not open for further replies.

dendic

Programmer
Jan 19, 2003
106
US
I have the path and file name. What is the code to print a file. The file types are tiff and pdf.
 
Here is a great faq from the VB6 forum (and works fine in VBA) to get the job done:
faq 222-2066 !

I have great faith in fools; self-confidence my friends call it.
-Poe
 
I want to print it directly without opening the application.
 
Then skip the function call and just use the "shell":

Dim G As Long
G = Shell("RUNDLL32.EXE URL.DLL,FileProtocolHandler " & YourstrDocPath, vbNormalFocus)

Not sure what you mean by "I want to print it directly without opening the application"? If there is no application it sorta follows there is no code. If you want to run a script to accomplish this, maybe check out one of those forums? Sorry I'm no good with that myself. If you mean the application to be Word or Acrobat, then this code goes in the calling app.
Or the 3rd thing you maybe mean? - just print the dang thing manually?
If that is the case just right-click the file and click on "Print"?



I have great faith in fools; self-confidence my friends call it.
-Poe
 
I want the file to go directly to the printer. Is this possible without any interaction
 
Someone or something needs to send it, right?
Don't know of a way other than ESP that it could just hop to the printer on its own. Sorry for my misunderstanding, but just don't "get it" yet. Please suffer with me, and maybe a few more descriptive specifics on the problem?

I have great faith in fools; self-confidence my friends call it.
-Poe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top