' MacroName: UnEnhance505 ' MacroDescription: Remove the delimiters from all enhanced 505's on the current page of a record. ' Macro written by: Joel Hahn, Niles Public Library District sub main Dim CS as Session Set CS=CurrentSession done=0 Doit: StartRow%=1 StartCol%=1 While CS.Find(" 505 ", StartRow%, StartCol%) done=1 CS.PutText " 505 0 " EndRow%=StartRow% EndCol%=StartCol% CS.Find chr(221), EndRow%, EndCol% If EndCol%=1 Then EndRow%=EndRow%-1 delim$=chr(223) NextR%=StartRow% NextC%=StartCol% Do While NextR%<=EndRow% CS.Find delim$, NextR%, NextC% If (NextR%=OldNR% And NextC%=OldNC%) Then Exit Do If NextR%>EndRow% Then CS.Find " ", NextR%-1, NextC% Exit Do End If If NextC%>77 Then EndR%=NextR% EndC%=NextC% Else EndR%=NextR% EndC%=NextC%+1 End If NextC%=NextC%-1 If NextC%<1 Then NextR%=NextR%-1 NextC%=NextC%+80 End If CS.Delete NextR%, NextC%, EndR%, EndC% OldNR%=NextR% : OldNC%=NextC% Loop StartRow%=EndRow% StartCol%=EndCol% Wend If done=1 Then RunMacro "PRSMUTIL!SendEdits" CS.Find " ", DumbRow%, DumbCol% Else MsgBox "No 505 fields found on this page." End If end sub