+ Reply to Thread
Results 1 to 2 of 2

Converting MSG files to TXT files

  1. #1
    Registered User
    Join Date
    02-10-2018
    Location
    Cleveland, Ohio
    MS-Off Ver
    2010
    Posts
    2

    Converting MSG files to TXT files

    Hello,

    I am probably posting a question that has already been answered. Because I am new to the Excel Forum, I was unable to find the solution.

    I am writing a macro that includes converting a series to msg files to corresponding txt files. The full path is the parameter, for example "c:\Documents\OutlookFiles\message1.msg" Has this VBA code been written before? Thanks!

  2. #2
    Valued Forum Contributor kasan's Avatar
    Join Date
    07-22-2009
    Location
    Riga, Latvia
    MS-Off Ver
    Excel 2010
    Posts
    680

    Re: Converting MSG files to TXT files

    Hi,
    Basically you can copy/paste all code below in a VBA module, then add Reference to "Microsoft Outlook Objects Library".
    Change the path to the folder where all yours .msg file are (under ConvertMsgToTXT sub, see comment in code).
    What you should be aware of - this code creates separate .txt file for each .msg, name of each .txt file is "Sender" + "Sent Date". In case there will be more than one Outlook message from the same Sender - files fill be re-written.
    You should run "Sub ConvertMsgToTXT()" to get all .msg files converted.


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

+ 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. converting 32-bit files to 64-bit files.
    By bklangston in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-01-2016, 04:23 PM
  2. Converting files to XML
    By cost9170 in forum Excel General
    Replies: 1
    Last Post: 03-03-2016, 04:12 PM
  3. converting excel files into csv txt files
    By robfeels in forum Excel General
    Replies: 0
    Last Post: 08-08-2013, 08:01 AM
  4. Replies: 1
    Last Post: 02-29-2012, 01:15 PM
  5. converting files
    By bustanutti21 in forum Excel General
    Replies: 0
    Last Post: 05-19-2006, 01:37 PM
  6. Converting Adobe files into Excel files
    By sweetsue516 in forum Excel General
    Replies: 2
    Last Post: 03-13-2006, 03:10 PM
  7. Converting CSV files into Excel files
    By baski in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-13-2005, 08:05 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