View external (local) HTML / Text Files in an Access Form

  • Thread starter Thread starter Rob
  • Start date Start date
R

Rob

I have spent the better part of the day looking for a solution to this and I
can't believe it is so complex.

I have a table with 200,000 entries where one field is a link
(path/filename) to a text file on my local hard drive and another is a link
to an html file also on my hard drive. I would like to view these two files
on a form along with the other data. If it is at all possible I dont want
users to have to click anything or open another document.

I am a new to this so I just need something quick and dirty. Users will not
need to add other files and I can guarantee that these two file links and
associated files will always be there. Obviously I dont want to embed the 2
gigabytes of text data that exists in these 200,000 files.

I really appreciate any help. I have seen solutions for doing this with a
few lines of code with images but not with text or html files. Thank you very
much in advance.

-Rob
 
Rob,
you use the browser control as follows:
put one on your form
in form current event code 'Me.WebBrowser1.Navigate2 tmpPath & "X.htm"

although there are other ways of doing it, you can use the same control for
the text file:
Me.WebBrowser1.Navigate2 tmpPath & "X.txt"

N.
 
NJS, thanks that was helpful with that I was able to figure it out although I
had to add a WebBrowser Active X control and then use that code (well replace
Webbrowser1 with Webbrowser0). I am still getting errors but I think this is
a security issue since I can see the html file.

Does anyone know how to turn on wordwrap in the Webbrowser control? or is
there another activex control alternative for viewing text files?

Anyway, thanks again.

-Rob
 
Can anyone help with this. I still don't have a solution that lets me use
word wrap with a browser control or another control that lets me view text
files with wordwrapping capabilities.

Thanks ahead of time for any help.

-Rob

p.s. sorry for cross-post to formscoding as well.
 
Back
Top