Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create xml Files with vba? 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hi,

I wrote some code, which creates a string with xml content. Now i want to save this string as file, if possible with the extension .xml, if not as .txt

Thanx for help.
 
Sub CreateAfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("c:\testfile.xml", True)

a.WriteLine("This is a test.")

a.Close
End Sub ide
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top