Dim strFilename As String
Dim strHTML As String
Dim FF As Integer
strFilename = "C:\testdoc.html"
strHTML = "<!DOCTYPE html><html> <body> <p>Hello World</p> </body></html>"
FF = FreeFile
Open strFilename For Output As #FF
Print #FF, strHTML
Open in new window
* Not actually sure how you would use Notepad to create an HTML document from VBA.
IT issues often require a personalized solution. With Ask the Experts™, submit your questions to our certified professionals and receive unlimited, customized solutions that work for you.
Take hold of your future.