function first_upper(cStrx) oRegExp = new OleAutoClient("VBScript.RegExp") oRegExp.global := true oRegExp.ignoreCase := true oRegExp.multiline := true oRegExp.pattern := "(^\s*\S)|(\.|\?|\!)\s*\S" aMatch = oRegExp.execute(cstrx) for n = 0 to aMatch.count-1 cMatch = aMatch.item(n).value nLen = aMatch.item(n).length nPos = aMatch.item(n).firstIndex cStrx = stuff(cStrx,nPos+nLen,1,upper(right(cMatch,1))) next return cStrx