Hi Guys,
I am new to VB and I have a question for you guys. I would appreciate if some one can help me to resolve that peoblem. I am trying print a file from a programme by clicking a button. I don't want to open that file, and I just want to print it to a printer. I wrote a programme using shellexecute and it is working alright but it is bringing up the printer dialog box to select a printer. Is there any way of avoiding that printer dialog box by choosing a printer as a constant or what ever?

my programme is as follows (it has one form and a module):

------Module-------------
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
-------------------------
----------Form-------------

Private Sub Command1_Click()
Dim r As Long
Dim lRtn As Long
Dim Action As String
Dim fname As String
'Printer.DeviceName = "lj_cs"
fname = "c:\temp\readme.html"
Action = "print"
'FileExecutor Me.hWnd, fname, Action
r = ShellExecute(Me.hWnd, Action, fname, vbNullChar, vbNullChar, 0)

End Sub

Private Sub Form_Load()

End Sub
-------------------------------------

You may ask why do I need this?? I am trying to create a dll and want to use it in an ASP page.
I would appreciate your help.
Thanks in advance for your kind help.

Alex