I'm using Access 2010 and I have a webbrowser control (not the ActiveX one) on a form. It's being used to hold some help/training materials that are in PDF format on a network drive. I am able to program switching from one file to another within VBA using buttons. I've noticed that when I navigate to a file that has already been viewed I am at the last location that was viewed, rather than at the top of the document.

While this doesn't really wreck the function I'm trying to get, it is a bit annoying to be at the end of the document when you want to be at the top. Is there a way to script something via VBA to force the control to scroll to the top or open the file with the top of the document visible? I've see some script utilizing javascript, but I'm not sure if that's something done within VBA or if it's coming from someplace else.

Is it possible to run java from VBA? If so how would I do that and do I need to load up a resource/library?

I have a script line that I cobbled together from reading dozens of posts, but it's giving me a Object doesn't support this property or method error when i try to run it. It's currently attached to a button click even on the form with the control.



Code:
Me.DocBrowser.Object.Document.parentWindow.execScript "window.scrollto(0, 0);", "javascript"
I seem to be getting bits and pieces of information and no way to piece it all together, sort of like looking through a bin of IKEA furniture parts without any instructions or labels. I can kind of see how things may fit, but don't know in what order or with what pieces. I'm hoping someone here can help me connect them correctly.

Thanks for any assistance offered.

DD