|
-
Mar 18th, 2007, 06:39 AM
#1
Print HTML file using ShellExecute
ShellExecute is supposed to print any file if the parameter passed is "print", it works on other files but I cannot get it work with HTML files, have you guys any workaround for this or am I missing something?
TIA
-
Mar 18th, 2007, 07:01 AM
#2
Fanatic Member
Re: Print HTML file using ShellExecute
Can we see the code?
-
Mar 18th, 2007, 07:06 AM
#3
Re: Print HTML file using ShellExecute
My basis...
Code:
retval = ShellExecute(Form1.hWnd, "print", "C:\Project\picture.bmp", "", "C:\Project\", _
SW_MINIMIZE)
-
Mar 18th, 2007, 07:12 AM
#4
Re: Print HTML file using ShellExecute
 Originally Posted by dee-u
My basis...
Code:
retval = ShellExecute(Form1.hWnd, "print", "C:\Project\picture.bmp", "", "C:\Project\", _
SW_MINIMIZE)
VB Code:
lngRetVal = ShellExecute(Me.hwnd, "Print", App.Path & "\Web.html", vbNullString, _
vbNullString, vbMinimized)
This works for me . You do not need to pass a value to lpDirectory parameter if you have used the full directory in the lpFile parameter.
Last edited by Jenova; Mar 18th, 2007 at 07:16 AM.
-
Mar 18th, 2007, 07:13 AM
#5
Fanatic Member
Re: Print HTML file using ShellExecute
Gee... looks fine to me.
Here is the MSDN on it. Maybe you see something different.
http://msdn.microsoft.com/archive/de...n_shelexec.asp
-
Mar 19th, 2007, 04:03 AM
#6
Re: Print HTML file using ShellExecute
 Originally Posted by Jenova
VB Code:
lngRetVal = ShellExecute(Me.hwnd, "Print", App.Path & "\Web.html", vbNullString, _
vbNullString, vbMinimized)
This works for me  . You do not need to pass a value to lpDirectory parameter if you have used the full directory in the lpFile parameter.
Hmmm... Maybe the directory parameter makes the difference, thanks guys, will check it out later...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|