Network Engineer -- A Looking Glass
A look into my work as a Network Engineer
Friday, April 10, 2015
Parse File, Write to a Different File
Const ForReading = 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\test2.txt", ForReading)
Set objWrite = objFSO.OpenTextFile("C:\Scripts\output.txt", 2)
Dim arrFileLines()
i = 0
Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(i)
arrFileLines(i) = objFile.ReadLine
i = i + 1
Loop
objFile.Close
For Each strLine in arrFileLines
MyArray = Split(strLine, ".", -1, 1)
Msg = MyArray(0)
Msgbox Msg
objWrite.WriteLine("<a href=""https://comp.service-now.com/GOTO=" & Msg & Chr(34) & ">" _
& Msg & "</a>" & "</p>" & vbCrLf)
' objWrite.WriteLine("=HYPERLINK(""https://comp.service-now.com/GOTO=" & Msg _
' & Chr(34) & "" & ",""Click Here"")")
' objWrite.WriteLine("https://comp.service-now.com/GOTO=" & Msg)
Next
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment