+ Reply to Thread
Results 1 to 2 of 2

VBA to pull email & sort

  1. #1
    Forum Contributor
    Join Date
    02-12-2018
    Location
    Clearwater, FL
    MS-Off Ver
    MS 365
    Posts
    214

    VBA to pull email & sort

    I have this code which pulls email from outlook and puts it in Excel broken apart, however the emails are a little different each time & was wondering if there is a way for it to trim off the beginning of each line? I know that when it says "Customer number:" I only want the number, the same would go for Name, Phone Number, Order & Container #.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,863

    Re: VBA to pull email & sort

    Hi,

    Here's a little snippet from your code which may point you in the right direction:
    Please Login or Register  to view this content.

    To prevent typos from ruining days and weeks of work 'Option Explicit' is NEEDED at the top of each code module. This prevents errors caused by missspellings and FORCES every variable to be DECLARED (e.g. Dim i as Integer). http://www.cpearson.com/excel/DeclaringVariables.aspx

    Debugger Secrets:
    a. Press 'F8' to single step (goes into subroutines and functions).
    b. Press SHIFT 'F8' to single step OVER subroutines and functions.
    c. Press CTRL 'F8' to stop at the line where the cursor is.
    d. 'Left Click' the margin to the left of a line to set (or clear) a BREAKPOINT.
    e. Press CTRL 'G' to open the IMMEDIATE WINDOW. 'debug.print' statements send their
    output to the IMMEDIATE WINDOW.
    f. Select View > Locals to see all variables while debugging.
    g. To automatically set a BREAKPOINT at a certain location put in the line:
    'Debug.Assert False'
    h. To conditionally set a BREAKPOINT at a certain location put in lines similar to:
    if i >= 20 and xTV20 > 99.56 then
    Debug.Assert False
    endif
    i. A variable value will be displayed by putting the cursor over the variable name.

    To manually set a breakpoint, see http://www.wiseowl.co.uk/blog/s196/breakpoints.htm

    Lewis

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Crate email from Excel - Pull data from excel and Create email message
    By saravanan1981 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-20-2016, 12:18 PM
  2. lookup and pull through email address
    By isolation123 in forum Excel General
    Replies: 1
    Last Post: 04-14-2016, 12:23 PM
  3. Cant pull specific text from email
    By brh5073 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-06-2015, 09:41 AM
  4. [SOLVED] VBA to pull out email id's
    By jagadeesh.rt in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-27-2015, 11:31 PM
  5. vba pull data from outlook body of email through email or subject of mail into excel
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 04:37 AM
  6. pull email address only from cell
    By RGREGCREWS in forum Excel General
    Replies: 1
    Last Post: 01-06-2014, 02:50 PM
  7. Pull data from email text
    By ghladik in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2013, 04:34 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1