Hi Vivek,
Not sure if I understood your query correctly. But let me give it a try. You intend to store the link name in a text file and then parse the text file to get the detail and then use it to identify the link.
If this is what you intend to do, you can try the following piece of code.
'************************************************************************
'************************************************************************
Let me know if this is what you intended to do and if this works as you expect it to.
The input file is in the following format as you had specified.
unique_id1 Link1 A
unique_id2 Link2 B
unique_id3 Link3 C
unique_id4 Link4 D
unique_id5 Link5 E
unique_id6 Link6 F
unique_id7 Link7 G
Thank You,
Ravi Shankar
Not sure if I understood your query correctly. But let me give it a try. You intend to store the link name in a text file and then parse the text file to get the detail and then use it to identify the link.
If this is what you intend to do, you can try the following piece of code.
'************************************************************************
Code:
Option Explicit
Dim i, fileName, resultArr
Function readLinkName(ByVal fileName)
Dim resArr(7)
Dim objFSO, objFile, lineItem, i
i = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(fileName)
Do Until objFile.AtEndOfStream
lineItem = objFile.ReadLine
resArr(i) = split(lineitem," ")(2)
i = i +1
Loop
readLinkName = resArr
End Function
fileName = "E:\InputFolder\InputFile.txt"
resultArr = readLinkName(fileName)
For i = 0 to UBound(resultArr) - 1
MsgBox resultArr(i)
Next
'************************************************************************
Let me know if this is what you intended to do and if this works as you expect it to.
The input file is in the following format as you had specified.
unique_id1 Link1 A
unique_id2 Link2 B
unique_id3 Link3 C
unique_id4 Link4 D
unique_id5 Link5 E
unique_id6 Link6 F
unique_id7 Link7 G
Thank You,
Ravi Shankar