DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: 'printto' verb won't work right for URLs

  1. #1
    Join Date
    Mar 2004

    'printto' verb won't work right for URLs

    Anyone have experience using the "printto" verb to print a web page? For a .url file type ("internet shortcut"), the printto verb has the following directive:

    rundll32.exe C:\WINNT\system32\mshtml.dll,PrintHTML "%1" "%2" "%3" "%4"

    If I pass the following to ShellExecuteEx()...

    printto "c:\MyPage.url" "\\ksmsps1\LJ5_COPYROOM" "HP LaserJet 5Si/5Si MX PS" "IP_10.10.30.241"

    ...I still get the Print dialog popping up. I would expect that, if I properly give printto all that it needs (filename, printer, driver, port), then it should silently do its job. I don't want the Print dialog to show, but I can't get it to shut up. The above parameters work just fine for Excel or Acrobat printto verbs, but it doesn't seem to do the trick for URLs. Any ideas?


  2. #2
    Join Date
    Dec 2003
    I think shellexecute has a silent option, at least it has a way to do dos commands that don't bring up the console. Try that trick and see? *direct* calls to a print dialog can also be used to have silent printing, if you can arrange it. Finally, you may be able to fool it if you can map a link to the printer instead of a network path (? you can map a drive, but unsure if you can map a printer this way). Network paths "\\etc" confuse many older programs(even if part of the OS) in windows.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center