' MacroName: DeleteHoldingsFromFile ' MacroDescription: Delete holdings from a pre-created file of OCLC numbers ' Macro written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS = CurrentSession 'Put the full path of the file where the OCLC numbers are here filename$="G:\DELETE.TXT" filenum%=FreeFile Open filename$ For Input As filenum% x=1 Do Until x=Lof(1) Line Input #filenum%, OCLCNum$ RecNum$="#"+OCLCNum$ CS.PutText RecNum$, 1, 1 RunMacro "PRSMUTIL!SendCommand" CS.PutText "delh", 1, 1 RunMacro "PRSMUTIL!SendCommand" x=x+1 y=Seek(1) If y>Lof(1) then x=Lof(1) Else Seek 1,y End If Loop Close filenum% Kill filename$ end sub