Private Sub Command1_Click()
Dim k As String
Dim v As String
k = "field"
v = "value"
Open "d:\test1.xml" For Output As #1
Print #1, "<?xml version=""1.0"" encoding=""utf-8""?>"
Print #1, "<head>"
Print #1, "<subHead " & k & "=""" & k & """>" & k & "</subHead>"
Print #1, "</head>"
Close
End Sub