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

Print Requester

Status
Not open for further replies.

ninash

Technical User
Jul 6, 2001
163
GB
Hi All,

How do you call the standard windows print requester from vba?

I need to be able to select the printer I am going to use.

Thanks in advance

Tony
 
Tony-- It looks like you and I are on the same wavelength; we both posted the same question on the same day...

I can get as far as pulling up the Windows Control Panel in its entirety, however, I'm only interested in allowing my users to get to the printer module only. To get to the Windows Control Panel, start a command button on your form, and attach the VBA line:

Call Shell("c:\windows\system32\control.exe", vbNormalFocus)

(Of course, you may need to modify your directory structure to reflect how you've got your machine set up.) I'm still waiting for help on any extensions to this command line that will display only the printer module.

Hopefully that'll get you started.

Thanks,
Rusty
 
Hi Rusty,

I am wanting to see the requester that you would get from doing CTRL P from within an application.

Are you sure you are wanting to see the same thing??

I only ask the question because I don't understand the need for calling the control panel.

Tony
 
Ninash,
Depending on your operating system and VB version you may try either of these.

DoCmd.RunCommand acCmdPrint

or

Declare Function PrintDialog Lib "comdlg32.dll" Alias "PrintDlgA" (pPrintdlg As PRINTDLG_TYPE) As Long


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top