I'm using the following line in my Access form, behind a command button, to open a web page in Internet Explorer (the page is located on a local server).
Opening the file is fine, but telling it to print has been a hassle. I haven't worked with Shell since I last worked with batch files in DOS (that's been a long while and it never dealt with html files).
Here's what I need help with:
1. I'd like to be able to print the page if possible. I tried the " /p " tag after iexplore.exe, but that didn't work (it thought that the /p was part of the page address rather than a print switch.
2. I also may have multiple files that need printing from time to time, so is it possible to only have the print dialog box show up only once (or not at all) for the files?
I don't have a problem just going into Windows Explorer and finding the html files, but I want to make this as easy as possible for others and I figured a database would be the way to go.
I'd appreciate any help attempted/given. I looked throughout tek-tips, msdn, and the web for help and could only find examples for pdf files or Microsoft PowerPoint, but not html files.
Thanks!
Code:
dRetVal = Shell("C:\Program Files\Internet Explorer\iexplore.exe " & "\\server\file_to_print.htm", 1)
Opening the file is fine, but telling it to print has been a hassle. I haven't worked with Shell since I last worked with batch files in DOS (that's been a long while and it never dealt with html files).
Here's what I need help with:
1. I'd like to be able to print the page if possible. I tried the " /p " tag after iexplore.exe, but that didn't work (it thought that the /p was part of the page address rather than a print switch.
2. I also may have multiple files that need printing from time to time, so is it possible to only have the print dialog box show up only once (or not at all) for the files?
I don't have a problem just going into Windows Explorer and finding the html files, but I want to make this as easy as possible for others and I figured a database would be the way to go.
I'd appreciate any help attempted/given. I looked throughout tek-tips, msdn, and the web for help and could only find examples for pdf files or Microsoft PowerPoint, but not html files.
Thanks!