'MacroName:SirsiPaste 'MacroDescription:Paste a SIRSI Workflows-format field from the Clipboard into CatME 'Macro created by: Joel Hahn, Niles Public Library District 'Last modified: 29 March 2005 sub main clipfmt = (Clipboard.GetFormat(1) OR Clipboard.GetFormat(7)) If clipfmt = FALSE Then MsgBox "No text on the Clipboard" Goto Done Else text$ = Clipboard.GetText(1) if text$ = "" Then text$ = Clipboard.GetText(7) End If dim CS as object On Error Resume Next Set CS = GetObject(,"Connex.Client") On Error GoTo 0 If CS Is Nothing Then Set CS = CreateObject("Connex.Client") End If Do While InStr(text$, "|") place = InStr(text$, "|") lt$="" : rt$="" If place>1 Then lt$=Left(text$, place-1) rt$ = Mid(text$, place+1) text$ = lt$ & " " & Chr(223) & Left(rt$, 1) & " " & Mid(rt$, 2) Loop i = 1 NextChar$ = "" Do CurChar$ = Mid(text$, i, 1) aa = Asc(CurChar$) Select Case Asc(CurChar$) Case 225 To 237, 239 To 251,254 'Move to be after next non-diacritic character NextChar$ = NextChar$ & CurChar$ 'NewText$ = NewText$ & CurChar$ Case Else 'Do nothing special NewText$ = NewText$ & CurChar$ & NextChar$ NextChar$ = "" End Select i = i + 1 Loop While i <= Len(text$) text$ = NewText$ bool = CS.InsertText(text$) Done: end sub