+ Reply to Thread
Results 1 to 3 of 3

New to VBA and looking to add Macro to extract Outlook 2010 email content to Excel 2007 wb

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Crandall, Texas
    MS-Off Ver
    Excel 2007
    Posts
    15

    Question New to VBA and looking to add Macro to extract Outlook 2010 email content to Excel 2007 wb

    Hello All, I have had no formal training in Excel or VBA, but I have used this forum many times in the past to solve problems I was facing in Excel. I have searched the web for a post that will describe how to extract Outlook email content to an Excel worksheet, but most posts usually assume some familiarity with VBA, which I have none. This is my first post as a member of this forum, so please be gentle! Could someone please help me find a solution to the following problem:

    I receive automated emails informing me of issues at certain sites that I am responsible for and I need to quickly track and be able to report on the sites I had issues with over the past week, or month, etc... The subject line is always the same for every email, but the contents will be different each time, with specific details for each site, time of issue, etc... Here is an example of the body of the most recent email(between the *****):
    **************************************************
    11/05/2012 11:30

    Communication Delays Detected

    Site Last Communication
    ----------------------- ------------------
    SiteName 11/05/2012 06:04
    **************************************************

    As you can see, it gives the time of the email on the first line, the type of alarm on the 3rd line(2nd line is blank), and the site name and date & time of last communication on the 7th line. Sometimes, if there are multiple sites with the same alarm, then they will be added sequentially in the same format to lines 8 and below.

    Also, just a sidenote, when the issue is resolved, or troubleshooting steps have been taken, there are replies sent out on the same email, so I need to either ignore emails with RE: in the subject, or preferrably add another rule that takes those emails with RE: in the subject line and inserts them as well so that I can eventually narrow down a repair time for each problem, but realizing that the body of those emails will not be in the original format, they will just say something to the affect of "Tech onsite, reboot cleared the problem!"!

    I am using Outlook 2010 Ver. 14.0.6112.5000 (32-bit) and Excel 2007 Ver. 12.0.6654.5003 on a Windows XP Pro Ver. 2002 SP3 machine!

    The extent of my VBA knowledge is that you press Alt+F11 to get to the VBA Editor in Outlook, and I just learned that about an hour ago.

    Sorry to be so longwinded, but I wanted to be sure I presented all of the necessary data! Please let me know if you need any additional info.

    Thanks in advance!

  2. #2
    Registered User
    Join Date
    10-30-2012
    Location
    Crandall, Texas
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: New to VBA and looking to add Macro to extract Outlook 2010 email content to Excel 200

    Okay, I found some code that works and thought I would share in case this could help anyone else. Below is the code that extracts all of the emails in a particular folder in Outlook to an existing excel file. I am still trying to tweak it some to only extract the pertinent info in the body of the email because right now, it brings back too much data for my needs, but it works atleast. If I figure out how to narrow the content down, I will share that as well!

    **************************************************************

    Please Login or Register  to view this content.
    ****************************************************************

    Moderator's Note: Welcome to the forum, You have to put code tags around your code, select the code then click on the # sign, I'll do it for you now. Thank you
    Last edited by vlady; 11-06-2012 at 09:31 PM. Reason: code tags

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Crandall, Texas
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: New to VBA and looking to add Macro to extract Outlook 2010 email content to Excel 200

    Oops! I apologize! Thanks for fixing it for me!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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