Help with writing to an HTML file with VBA

P

PerdueKaren

OK here's the deal. I have this Access database that I use to log
server checks for some old Netware servers. With the help of some
other cool stuff I found in Groups, I made this module that writes the
results of the server checks out to html pages, one per server. Now
what I am trying to do (because my boss is never happy enough) is make
a "dynamic" page that shows the name of each server as a hyperlink to
the server's html page. The html files all write out like they're
supposed to but making the page with the links is kicking my butt!

What I NEED to do is print this line (SOME_SERVER is a variable that
holds the name of the current server being written out):

<a href="SOME_SERVER.html">SOME_SERVER</a>

What I have tried:

Print #FileName, "<img src=" & """ & "SOME_SERVER" & ".html" _
& """ & ">" & "SOME_SERVER" & "</a>"

What Access/VBA turns it into (look at the .html part):

Print #FileName, "<a href=" & """ & SOME_SERVER & "; .html; " _
& """ & ">" & SOME_SERVER & "</a>"

I sure would appreciate any ideas/suggestions. I chose not to post all
of the code - it's really pretty long - but I can post/send it if
needed.

Thanks in advance!
 
P

PerdueKaren

I figured it out. The line NOW says:
Print #FileName, "<a href=" & Chr(34) & "http:\\the intranet server"_
& myFile & Chr(34) & ">" & intId1 & "</a>"


And it WORKS! WOOT!
 
T

Tim Ferguson

Print #FileName, "<a href=" & Chr(34) & "http:\\the intranet server"_
& myFile & Chr(34) & ">" & intId1 & "</a>"

Or, if you prefer,

Print #FileName, _
"<a href=""http://myintranet/" & myFile & ".html"">" & _
intId1 & "</a>"


Hope that helps

Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top