Ray Padilla
asked on
Modify Subject Line of a memo from Querysend
Hey Experts,
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?
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
Else
Subject$ = Trim(Strleft(source.Document.Subject(0),"["))
Call Source.FieldSetText("Subject",Subject$)
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Was taking to long to work on this, still haven't given it a try will do so when I get back on this project...Thanks
ASKER