Results 1 to 4 of 4

Thread: Browser Control

  1. #1
    JamesP
    Guest

    Browser Control

    Hi
    This is a two part question.
    1) Is there a way to place code into a web document that will cause a page break so that when the document is being printed out it will automatically start a new page at specified spot?
    2) Is there a way that I can control Internet Explorer using VBA code in Access? I wish to have the browser refresh.

    Thank you!

  2. #2
    Lounger
    Join Date
    Jan 2001
    Location
    London, Ontario, Ontario, Canada
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser Control

    Regarding question #1.
    I have recently wrestled with the same sort problem and I have found that there is no such code. (Somebody please correct me if I'm wrong) However; I was able to find a solution through a particular bit of code that will directs a print function to print a specific document. For example, if you have a user that has just entered data into a form, output the data to a template and when the user clicks the print button, it will print that document and not the html page.
    Copy this script into the head of your document.
    <link rel=alternate media=print href="printversion.doc">
    Rename printversion.doc to the document you wish the user to print. Does not work well with Netscape. I hope this works for you.

  3. #3
    JamesP
    Guest

    Re: Browser Control

    Thanks
    That code gives me some ideas to try or at least a place to start looking!

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Browser Control

    On #1, Internet Explorer 4 and higher recognize two special style rules:

    page-break-before
    page-break-after

    My HTML book is too cryptic to provide further guidance.

    On #2, there probably is a way to do this. Part 1 is to identify the "handle" for the open window, and part 2 is to refresh the page. Regarding part 1, see this post: <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=18202>http://www.wopr.com/cgi-bin/w3t/showthread...vb&Number=18202</A>. Regarding part 2, other than SendKeys, I don't know.

Posting Permissions

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