View Single Post
 
Old 12-01-2015, 02:48 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could find out what these functions do by selecting them and pressing F1 in the VBA help. For example:
• The InStr function returns the starting position of one string within another.
Since StrTxt holds the string returned by HttpReq.ResponseText:
InStr(StrTxt, https://mirror.patentscope.wipo.int/...df_pct_mirror/)
tells us where in that text the string 'https://mirror.patentscope.wipo.int/patentscope/docservicepdf_pct_mirror/' begins. That value is stored as a number in the variable 'i'. If 'i' = 0, the text wasn't found.
• The Mid function retrieves the part of a string beginning between one location and another.
Thus, StrTxt = Mid(StrTxt, i, Len(StrTxt) - i) keeps just that part of StrTxt that begins at position 'i' (the number returned by InStr) in StrTxt to the end of that string.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote