Quote:
Originally Posted by PRA007
So the question is, If My StrTxt contains multiple occurrences of a string like "string", how to get all of it.
For example in hypothetical string.
Code:
StrTxt = "mmrkxyz" & vbCr & "mmrkyzx" & vbCr & "xyz" & vbCr & "yzx" & vbCr & "mmarkxxx"
Now I Just want to get all the lines that have initial mmrk as string like this, so that I can further process it.
|
Well, I'm sure you know that a simple Find/Replace in Word can process all instances in a single pass, which is why it might be good to open the file with Word. And, for simple strings in VBA, so to could the VBA Replace method process all instances in a single pass.