Here is a typical subject on a memo:
Invoice Credit - XX Client 1186-P0001 [1186-G0001;1186-P0001]
What I need to do is delete the brackets and anything between the brackets but keep any data before or after the brackets...my code is below, what I have been doing is deleting everything after the [ (left bracket) of course requirements have changed and I am a little stumped. I tried a few methods but I cannot seem to NOT delete anything pass the right bracket....ideas suggestions?
'Remove old jobnumbers before mailing
If Instr(source.Document.subject(0)," [" ) = 0 Then
Subject$ = Trim(Strleft(source.Document.Subject(0),"["))