iankerry
Registered User.
- Local time
- Today, 02:18
- Joined
- Aug 10, 2005
- Messages
- 190
Hi All
I get an email from our website, with the subject heading:
Promoter feedback - 23232, Bosbury Parish Hall
I want to get the number and pass it over to Access to find that particular record.
First stage is to 'capture' the number. With help from others I have this so far:
I can run this line again with Trim(left), but the problem is that this part of the subject line can be different lengths.
There are two things that might help me - one is the COMMA that appears - anything after the comma (and including) I could lose - but i don't know how to do that.
The second thing is that (for the forseeaable future anyway) the length of the number will 5 digits.
Can anyone suggest what i could try next?
many thanks
I get an email from our website, with the subject heading:
Promoter feedback - 23232, Bosbury Parish Hall
I want to get the number and pass it over to Access to find that particular record.
First stage is to 'capture' the number. With help from others I have this so far:
Code:
out_eventid = Trim(Right(out_mail.Subject, Len(out_mail.Subject) - InStr(1, out_mail.Subject, "ID:", vbTextCompare) - 20))
I can run this line again with Trim(left), but the problem is that this part of the subject line can be different lengths.
There are two things that might help me - one is the COMMA that appears - anything after the comma (and including) I could lose - but i don't know how to do that.
The second thing is that (for the forseeaable future anyway) the length of the number will 5 digits.
Can anyone suggest what i could try next?
many thanks