Make HTML Document

M

Murp

I have a function in a module that produces the code for an html page. I was
wondering what would be the best way to make a new .htm file using this code?
 
B

Brendan Reynolds

Public Sub CreateHTML()

Dim intFile As Integer
Dim strFile As String

strFile = "c:\usenet\test.htm"
intFile = FreeFile
Open strFile For Output As intFile
Print #intFile, "<HTML><HEAD><TITLE>My Test HTML Page" & _
"</TITLE></HEAD><BODY><HR><H1>Hello World!</H1>" & _
"<HR></BODY></HTML>"
Close intFile
Application.FollowHyperlink "c:\usenet\test.htm"

End Sub
 
Top