Re: Help parsing body text

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





You must find the delimiter for columns and rows. It seems that the
delimiter for columns is the Pipe (|), and the one for rows might be vbCRLF.

Then you can use the Split function to first get an array with rows, then
use the function again for every row to split by the Pipe.

--
Best regards
Michael Bauer - MVP Outlook
Use Outlook Categories? This is Your Tool:
<http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6>

Am Sat, 8 Mar 2008 21:24:58 -0800 (PST) schrieb HammerJoe@xxxxxxxxx:

Hi,

I wonder if anyone could get me started on how to parse the text body
of an email.

The body looks like this:


--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
|Sunday |Monday |Tuesday |Wednesday |
Thursday |Friday |Saturday |
|03/09/08 |03/10/08 |03/11/08 |03/12/08 |
03/13/08 |03/14/08 |03/15/08 |

--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------
7550 |OFF | 0930-1730| 0900-1700| 0900-1700|
0930-1730| 0930-1730|OFF |
Joe, Hammer |L 1400-1500|T 0900-1300|T 0900-1300|L 1400-1500|L
1400-1500| |
| | |L 1300-1400|L
1300-1400| | | |
| | |T 1400-1700|T
1400-1700| | | |

--------------------|-----------|-----------|-----------|-----------|-----------|-----------|-----------|-------------

The email contains a list of schedules for several people.
The first 'column' is dependent on the longest name of all the
individuals, the weekly 'columns' are static in size but as you can
see they can have several 'rows'.
I need to parse each person and find special events and set up a
calendar reminder to be sent to the person.
In my example I need to set up a calendar invite for all the times
that have a 'T', for ie Tuesday 0900-1300 and 1400-1700.

I have been playing with this for awhile and all I come up is a messy
spaghetti code and I not getting anywhere.
I would appreciate any help that would get me started on this.
Thanks.
.



Relevant Pages

  • Re: Import Deleimited file fails after 25 lines
    ... >> If you see the pipe | character in the wizard window where the data show ... then the pipe is not the delimiter in the text ... >> The Wizard will replace the pipe with vertical spacing lines that go all ...
    (microsoft.public.access.externaldata)
  • Re: Advanced? Parsing Methods
    ... >>and writes new records to a table in a SQL Server 2000 database. ... >> Would it be faster to use the Splitfunction to parse each line (using ... >> a comma delimiter) and pass the parsed data to an array? ... that I can select a specific item within the array. ...
    (microsoft.public.access.modulesdaovba)
  • Re: select (display) problem
    ... You need to specify a different delimiter. ... The default is a vertical pipe ... to the official business of DigiCare (Pty) Ltd. ...
    (comp.databases.informix)
  • Re: Import Trailing Spaces
    ... If i can change the delimiter from PIPE ... recordset for adding new data, loop through rest of records, parsing ... the trailing spaces imported with the field name. ...
    (microsoft.public.access.externaldata)
  • Re: Problem with SPLIT function
    ... > I need to parse a file that is delimited by comma. ... > When I use the SPLIT function to split the text with, as the delimiter, I ... > IMAGE AKA WILL ... > SMITH, JOHN ...
    (microsoft.public.vb.general.discussion)