Hello everyone,
I have been working on an excel userform that takes input and generates some javascript code. I have been successful in outputting this code to a new .txt file with shell Notepad.
I would like instead to add the text that the userform generates into an existing HTML document between the <script type = "text/javascript"> </script> tags at a specific line. I am not quite sure how I may be able to accomplish this.
Private Sub CommandButton1_Click()
Dim contNum As String
/* I declared the string variables here to which I assigned the contentBox.value */
Dim quote As String
Dim filePath As String
contNum = ContentNumber.Value
/* I assigned the values here */
filePath = "C:\Users\....\Debug Copy.html"
quote = Chr(34)
My initial code when I was creating a new txt file was
Open "tempcode.txt" For Output As #1
Print #1 ".... etc etc etc"
Since I need instead to modify my own existing .html I have been rather lost on how I may do this. I have tried Open filePath For Append As #1 but it does not seem to be ok. I would appreciate any suggestions as I am rather new to VBA. Thank you!
Bookmarks