Need Help, It's A Toughie

  1. #1
    steadboy is offline Newbie

    Need Help, It's A Toughie

    Now i'm not sure what to do about this but what i'd like to do is insert a "Print This Page" on my web page. It sounds simple enough I just can't seem to hack it.


  2. #2
    D-A-L is offline D-A-L Administrator
    Hi, Welcome to D-A-L

    Do you mean like this? http://javascript.internet.com/messages/print-page.html

  3. #3
    steadboy is offline Newbie
    Thanks for the help dude, exactly what I was looking for. If I need anything else I'll be back, believe me.

  4. #4
    D-A-L is offline D-A-L Administrator
    No worries

  5. #5
    MartynG is offline Newbie
    Tackle the Web with $5.99 .COM's from Go Daddy!
    Quote Originally Posted by steadboy
    Now i'm not sure what to do about this but what i'd like to do is insert a "Print This Page" on my web page. It sounds simple enough I just can't seem to hack it.
    Some VB script will do it if you have asp pages or .NET

    Dim objIE As New InternetExplorer
    objIE.Navigate2 (i_strFileName)
    'loop until the document has loaded in the browser.
    'only do this for 60 seconds before sending a message to avoid
    'endless loops
    intCount = 1
    Do While objIE.ReadyState <> READYSTATE_COMPLETE
    Sleep 1000
    intCount = intCount + 1
    If intCount > 60 Then
    strErrMsg = "Cannot load document "
    GoTo Err
    End If
    Loop
    objIE.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0
    'sleep another 5 secs to allow the job to get to the printer
    Sleep 5000
    Set objIE = Nothing

    If it is a .pdf etc the printer dialogue will show if its html etc it will go straight through to the printer

+ Reply to Thread