'MacroName:search2 Sub Main Dim CS As Object Set CS = CreateObject("Connex.Client") if CS.IsOnline = false then msgbox("you are not logged in") exit sub end if prefix$ = "no:" suffix$ = " ll:eng not mt:elc" OCLC$ = inputbox("If you add a pound sign to the beginning or end, an OCLC# search will be performed.","No parallel, no electronic search","") if OCLC$ = "" then exit sub 'cancel button if instr(OCLC$, ",") or instr(OCLC$, "/") then msgbox("Search not supported") exit sub end if if isNumeric(OCLC$) then count% = CS.Search ("WC", "sn:" & OCLC$ & suffix$) else if right(OCLC$, 1) = "#" then OCLC$ = "#" & left(OCLC$, len(OCLC$) - 1) count% = CS.Search ("WC", OCLC$) else if left(OCLC$, 1) = "#" then count% = CS.Search ("WC", OCLC$) else if left(OCLC$, 1) = "a" then OCLC$ = mid(OCLC$, 2) 'Polaris if instr(OCLC$, ":") then prefix$ = "" if left(OCLC$, 3) = "ocm" then OCLC$ = prefix$ & mid(OCLC$, 4) if left(OCLC$, 3) = "ocn" then OCLC$ = prefix$ & mid(OCLC$, 4) if left(OCLC$, 2) = "on" then OCLC$ = prefix$ & mid(OCLC$, 3) if left(OCLC$, 1) = "o" then OCLC$ = prefix$ & mid(OCLC$, 2) if left(OCLC$, 7) = "(OCoLC)" then OCLC$ = prefix$ & mid(OCLC$, 8) if mid(OCLC$, 5, 1) = "-" then OCLC$ = "in:" & OCLC$ 'ISSN count% = CS.Search ("WC", OCLC$ & suffix$) end if end if end if if count% = 0 then msgbox("no results") call main end if end sub