+ Reply to Thread
Results 1 to 2 of 2

How do I preserve table formatting from email Body when writing to a file?

  1. #1
    Registered User
    Join Date
    05-08-2012
    Location
    Golden, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    77

    How do I preserve table formatting from email Body when writing to a file?

    I have a visual basic program that detects then an email with a report arrives.
    I am able to write the data from the Body of the email out to a file (txt, html..).
    In the Outlook view, there is a nice table. However one of the fields is a text field that often has Tabs in it, so when I try to import into excel, the columns do not align.
    I want to be able to export the body of the e-mail so I can then import it into excel and preserve the columns from the table.
    How can I write the body into a file so I can then determine wherer the column seperators are in the table?
    Thank you.

  2. #2
    Registered User
    Join Date
    05-08-2012
    Location
    Golden, Colorado
    MS-Off Ver
    Excel 2010
    Posts
    77

    Re: How do I preserve table formatting from email Body when writing to a file?

    I have found the solution. One needs to save the entire e-mail, not just the Body and use the olHTML format, so something like this:
    Please Login or Register  to view this content.
    Then you can open the file in Excel and the columns are preserved. Some parsing of the Grouped Cells is required.

+ 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