I receive a csv file in email. I want to delete the first 5 or 6 rows with VBA code in Outlook.
I thought to put the csv file into a string, do what I want then save it again as a csv file. I have done the process of storing inside the string and saving it again as csv file .
I don't know how to delete the lines while the text is inside the string.
This is how I put the csv file in a string.
Dim iTxtFile As Integer
Dim strFile As String
Dim strFileText As String
strFile = "C:\Users\Hussein.azad\Desktop\4G.csv"
iTxtFile = FreeFile
Open strFile For Input As FreeFile
strFileText = Input(LOF(iTxtFile), iTxtFile)
Close iTxtFile
strFileText = Replace(strFileText, "NIL", "0")