Returns a specified number of characters from a string.QTP-Mid

Syntax –

Mid(string, start[, length])

Example –

The following example uses the Mid function to return six characters, beginning with the fourth character, in a string:

  1. Dim MyVar
  2.  
  3. MyVar = <b>Mid(</b>"VBScript is fun!"<b>,</b> 3<b>,</b> 6<b>)</b> ' MyVar contains "Script".