How would I insert the contents of a textbox into any html file I open up without deleting all the html contents? I am also trying to figure out how to get the textbox contents at the beginning of the html document.

Here is my code for it

cd.DialogTitle = "Save HTML file"
cd.Filter = "HTML Files|*.htm;*.html;*.shtml;*.shtm;*.stm;*.asp;*.htt;*.css;*.tem|All Files (*.*)|*.*"
cd.FLAGS = 4
cd.ShowSave

If Len(cd.FileName) > 0 Then

strFileName = cd.FileName

On Error Resume Next
If Dir$(cd.FileName) <> "" Then Open (cd.FileName) For Output As #1
Write #1, cd.FileName & Text1.Text
Close #1

End If

..But I keep deleting the HTML files contents and replacing it.

I am trying to get the end result to look like this:

<head>

TEXTBOX CONTENTS RIGHT HERE

</head>

<title></title>