Re: extracting data

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Alex Dybenko (alex_at_PLEASE.cemi.NO.rssi.SPAM.ru)
Date: 11/30/04


Date: Tue, 30 Nov 2004 18:33:23 +0300

Hi,
then you have to get a position of other_details, then get a length of
comment data and then get it using same mid, but also supplying length
HTH

-- 
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com
"Jack" <Jack@discussions.microsoft.com> wrote in message 
news:79DE3FD1-7722-4135-B5DE-F78E6378FB2C@microsoft.com...
> Alex,
> Thank you so much for the quick reply. Your solution would work if i had
> only one memo box (comments). For some reason in frontpage form it wants 
> to
> place the memo box fields at the end. I apoligize for not giving enough
> details.
>
> here is a sample of the email i get:
> first name:   joe
> last name:    blow
>
> comments: <------------notice how the memo fields automatically drop
> chr(13)after the single fields.----------------
>
> here is where comments actual start
> second line of comments.
>
> other_details:
>
> here is where second memo starts
> second line goes here.
>
> I have tried replacing chr(13) in numerious places within code without a
> positive result. As I mentioned before, the single fields work great. Its
> only where there are 2 chr(13) between the field name and field value 
> inside
> of the email.
> The form / email that comes in is in formatted text. I have tried to 
> change
> it to comma delimited but then I believe there would be problem if all 
> fields
> were not filled in.
>
> Any further assistance / expertise you could provide would be greatly
> appreciated.
>
> Thank you,
> Jack
>
>
> "Alex Dybenko" wrote:
>
>> Hi Jack,
>> try something like this
>> get start of comments:
>> StartLine = InStr(textLine, "comments:")
>>
>> get rest of message:
>>
>> strCommnents=mid(textLine, StartLine +10)
>>
>> replace CHR(13) with space
>>
>> strCommnents=replace(strCommnents,CHR(13)," ")
>>
>> HTH
>> -- 
>> Alex Dybenko (MVP)
>> http://Alex.Dybenko.com
>> http://www.PointLtd.com
>>
>>
>>
>>
>> "Jack" <Jack@discussions.microsoft.com> wrote in message
>> news:978C0CCB-AFEA-4485-88CD-D9C249383746@microsoft.com...
>> >I am using the following routine to extract data from email(web form) 
>> >form.
>> > The routine works great for single fields however if a field in the
>> > webform
>> > is a memo box. it doesnt work for that field. I believe its because 
>> > there
>> > are
>> > multiple CHR(13) between the fields. For Example the email I get looks
>> > like
>> > this:
>> >
>> > First name: xxxx
>> > last name:  xxx
>> > comments:
>> >
>> > xxx this is where comments start.
>> > xxxx and continue
>> > xxxx and continue
>> >
>> > Can someone take a look at this sniplet and tell me what is the best 
>> > way
>> > to
>> > correct this? Code follows:
>> >
>> > Public Function ExtractDetail(textLine As Variant, FormItemReq As 
>> > String)
>> > As
>> > Variant
>> >
>> > Dim StartLine As Variant, EndLine As Variant, ExtractText As Variant
>> >
>> >  StartLine = InStr(textLine, FormItemReq)
>> >  If StartLine > 0 Then
>> >
>> >    StartLine = StartLine + Len(FormItemReq)
>> >    EndLine = InStr(StartLine, textLine, Chr(13))
>> >    ExtractText = Mid(textLine, StartLine, EndLine - StartLine)
>> >
>> >  End If
>> >  If Len(ExtractText) = 0 Then ExtractText = ""
>> >
>> >  ExtractDetail = Trim(ExtractText)
>> >
>> > End Function
>> >
>> >
>> > Thanks, Jack
>> >
>>
>>
>> 


Relevant Pages

  • Re: extracting data
    ... place the memo box fields at the end. ... >>I am using the following routine to extract data from emailform. ... >> Public Function ExtractDetail(textLine As Variant, ...
    (microsoft.public.access.modulesdaovba)
  • Re: Balanced connections on domestic equipment.
    ... The basic jack used on the ... for telephone exchange use. ... More recent smaller gauges are a variant ... better against the leaf-spring contact of the female connector. ...
    (uk.rec.audio)
  • Re: Balanced connections on domestic equipment.
    ... The old PO jack used frequently at one time in studios and broadcast ... for telephone exchange use. ... More recent smaller gauges are a variant on ... better against the leaf-spring contact of the female connector. ...
    (uk.rec.audio)
  • Re: Balanced connections on domestic equipment.
    ... The old PO jack used frequently at one time in studios and broadcast ... for telephone exchange use. ... More recent smaller gauges are a variant on ... better against the leaf-spring contact of the female connector. ...
    (uk.rec.audio)
  • Re: Balanced connections on domestic equipment.
    ... The old PO jack used frequently at one time in studios and broadcast ... for telephone exchange use. ... More recent smaller gauges are a variant on ... better against the leaf-spring contact of the female connector. ...
    (uk.rec.audio)