Improve company productivity with a Business Account.Sign Up
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.
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.