I did finally figure this out. It is call normalizing a string. Like Ankeh mentioned, I needed to place a \ in front of characters not recognized by QTP when it is in a link etc.
My link namesd change and contain all types of characters, those along with the number keys on the keyboard.
To normalized a string, I used Replace. My function is thus:
My link namesd change and contain all types of characters, those along with the number keys on the keyboard.
To normalized a string, I used Replace. My function is thus:
Code:
Public Function NormalizeString (OrgStr)
Dim TempStr
TempStr = Replace(OrgStr, "\", "\\")
TempStr = Replace(OrgStr, "/", "\/")
TempStr = Replace(TempStr, "*", "\*")
TempStr = Replace(TempStr, "+", "\+")
TempStr = Replace(TempStr, "(", "\(")
TempStr = Replace(TempStr, ")", "\)")
TempStr = Replace(TempStr, "=", "\=")
TempStr = Replace(TempStr, "&", "\&")
TempStr = Replace(TempStr, "@", "\@")
TempStr = Replace(TempStr, "#", "\#")
TempStr = Replace(TempStr, "_", "\_")
TempStr = Replace(TempStr, "!", "\!")
NormalizeString = Replace(TempStr, "?", "\?")
End Function