Results 1 to 7 of 7

Thread: Print The Web Page

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    Working with the printer is a pain...

    I had an idea to display what I wish to print as a web page in a hidden webbrowswer and the tell that webbrowser to print


    webbrowser1.print


    but there is not print method

    there must be a way!
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  2. #2
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    Here's a way to do it:
    Code:
    'to print
    WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER
    That print one will just print whatever is it there right out. If you use OLECMDEXECOPT_PROMPTUSER, you'll get a dialog to change stuff like number of copies and so on.
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    thanks this is going to make printing reports etc great!
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    what if the webbrowser is not visible
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  5. #5
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    Hmm.. I'm not sure about that. I made my own browser with it once, and never tried that possibility. I'm inclined to say it would work, but you'll never know until you try heh heh.
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    I just made the browser 1 x 1 and stuck it off the side of the form



    one more PROBLEM

    what if i don't want it to print the page 1 of 1 and then
    file//c: and the date on the page.

    I just want the page

    [Edited by kurtsimons on 10-27-2000 at 12:48 PM]
    Kurt Simons
    [I know I'm a hack but my clients don't!]

  7. #7
    Fanatic Member Kaverin's Avatar
    Join Date
    Oct 2000
    Posts
    930
    Sorry I didn't reply for a while, but I've been preparing for some grad exams. Anyway, I don't know how you could suppress those things from printing, but I'd be willing to say it could be done. And I tested out the visible thing for myself, and it seemed to work fine (but you probably already know that).
    I'm baaaack...
    VB5 Professional Edition, VC++ 6
    Using a 1 gHz Thunderbird, 256 mb RAM, 40 gb HD system with Win98se

    I feel special because I finally figured out how to loop midis: Post link
    I'm a fanatic too

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width