Hi, I've got this macro code in Microsoft Office Word 2003 which reads the lines of a text file. The lines each represent a string value that I need to use later in the code.
However, the first two lines of the text file contains some stuff that I don't need. How can I modify the code so that it skips the two first lines? The "intellisense" within the VBA editor in Word sucks hard btw..
Anyway, the code looks something like this
Dim sFileName As String
Dim iFileNum As Integer
Dim sBuf As String
Dim Fields as String
sFileName = "c:\fields.ini"
''//Does the file exist?
If Len(Dir$(sFileName)) = 0 Then
MsgBox ("Cannot find fields.ini")
End If
iFileNum = FreeFile()
Open sFileName For Input As iFileNum
Do While Not EOF(iFileNum)
Line Input #iFileNum, Fields
MsgBox (Fields)
And this code currently gives me all of the lines, and I don't want the first two.