'MacroName:musicGenres '-------------- function replace(strString as string, strOld as string, strNew as string) as string dim pos as integer pos = instr(strString, strOld) do while pos > 0 strString = left(strString, pos - 1) & strNew & mid(strString, pos + len(strOld)) pos = instr(strString, strOld) loop replace = strString end function '--------------- Sub Main Dim CS As Object Set CS = CreateObject("Connex.Client") excerpts = FALSE do x% = x% + 1 CS.GetField "650", x%, temp$ if temp$ = "" then exit do else if instr(temp$, chr(223) & "2 fast") then 'do nothing else temp$ = mid(temp$, 6) 'Excerpts if instr(temp$, "v Excerpts") then excerpts = TRUE 'remove $z pos% = instr(temp$, chr(223) & "z") if pos% > 0 then temp$ = left(temp$, pos% - 2) 'remove $y pos% = instr(temp$, chr(223) & "y") if pos% > 0 then temp$ = left(temp$, pos% - 2) 'remove $v pos% = instr(temp$, chr(223) & "v") if pos% > 0 then temp$ = left(temp$, pos% - 2) 'remove inverted info pos% = instr(temp$, ",") if pos% > 0 then temp$ = left(temp$, pos% - 1) 'remove qualifiers pos% = instr(temp$, "(") if pos% > 0 then if instr$(temp$, "(Music)") = 0 then temp$ = left(temp$, pos% - 1) 'remove Children's temp$ = replace(temp$, "Children's", "") CS.AddField x%, "655 7" & temp$ end if end if loop if excerpts then CS.AddField 99, "655 7Excerpts" End Sub