parse the next line in outlook

Posted on 2006-03-19
Last Modified: 2010-05-01

If intLocLabel > 0 Then
       strText = Left(Trim(Mid(strSource, intLocLabel + 14)), 9)
       intLenLabel = Len(strText)

parses a 9 digit number just after my key phrase, how would I parse all the information on the next line?
Question by:bpfsr
    LVL 9

    Expert Comment

    by:Naveen Swamy
    not clear with your question???????
    LVL 13

    Expert Comment

    i think we need to know some more about the formatting....

    however to speed this up, you can place $ signs right to Left,Trim and Mid like this:

    strText = Left$(Trim$(Mid$(strSource, intLocLabel + 14)), 9)

    that is about 20% faster

    Author Comment

    Sorry - what I'm saying is I use the code above to parse a particular number from the same line as the LocLabel. In this case it is a reference numbers, so I am searching for the phrase "reference #:" and then parsing the number itself, which always falls immediately after "reference #:" and is always on the same line. However, I want to seperately parse, for insertion somewhere else, the line beneath "reference #:". So if  - strText = Left$(Trim$(Mid$(strSource, intLocLabel + 14)), 9) - gives me the number following "reference #:", how do I get the line beneath it?
    LVL 13

    Accepted Solution


    you can search for a vbcrlf (linebreak)

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Introduction While answering a recent question ( in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
    When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now