Link to home
Start Free TrialLog in
Avatar of Ray Padilla
Ray PadillaFlag for United States of America

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?
'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

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of SysExpert
SysExpert
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Ray Padilla

ASKER

Been on another project will give this a try this week...
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