Re: extracting data
From: Jack (Jack_at_discussions.microsoft.com)
Date: 11/30/04
- Next message: anonymous_at_discussions.microsoft.com: "Copying a table between two external databases"
- Previous message: larry1: "How can I get Robustness Diagram symbols in Visio?"
- Next in thread: Alex Dybenko: "Re: extracting data"
- Reply: Alex Dybenko: "Re: extracting data"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 05:29:25 -0800
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
> >
>
>
>
- Next message: anonymous_at_discussions.microsoft.com: "Copying a table between two external databases"
- Previous message: larry1: "How can I get Robustness Diagram symbols in Visio?"
- Next in thread: Alex Dybenko: "Re: extracting data"
- Reply: Alex Dybenko: "Re: extracting data"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|