Mid function returns a specified number of characters from a string.
Syntax: Mid(string, start[, length])
String: String expression from which characters are returned. If string contains Null, Null is returned.
Start: Character position in string at which the part to be taken begins. If start is greater than the number of characters in string, Mid returns a zero-length string ("").
length: Number of characters to return. If omitted or if there are fewer than length characters in the text (including the character at start), all characters from the start position to the end of the string are returned.
Str="Welcome to the World of QTP" print Mid(Str,9,12) Output: to the World Print Mid("Slightbook",3,8) Output: ightbook Print Mid("Good Morning",6,7) Output: Morning