If i#nDeviceline and i#nOutputLine and i#nDriverline
To avoid repeating the variable, "i", I would write this as:if not inlist(i, nDeviceLine, nOutputLine, nDriverLine)And in:
m.NewExpr=m.NewExpr + mline(expr,i) +chr(013)I consider it safer to use the "official" end-of-line delimiter: chr(13) + chr(10).
Replace expr with m.NewExpr Replace tag WITH "" Replace tag2 WITH ""I suspect this might execute a little faster with a single replace command:
replace; expr with m.NewExpr,; tag with "" tag2 with ""