+ Reply to Thread
Results 1 to 3 of 3

Save emails from Outlook as .msg with dates in filenames

  1. #1
    Registered User
    Join Date
    02-27-2019
    Location
    Toronto
    MS-Off Ver
    2016
    Posts
    1

    Question Save emails from Outlook as .msg with dates in filenames

    Hi there, I'm actually trying to save Outlook 2016 emails as pdfs with the receive date in the file name (as it only has the subject title in the file name normally), but I was having trouble with this.

    I came about a blog post from 2015 via google that posted a VBA script to export outlook as .msg with dates in filenames, but I keep getting a syntax error.

    I'm not familiar with scripting or anything VBA related, so I was wondering if someone might be able to direct me in the right path.

    The script from the blog post is here:

    HTML Code: 
    This part of the code gets highlighted

    HTML Code: 
    and

    HTML Code: 

    Any help would be appreciated. Thank you.

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Save emails from Outlook as .msg with dates in filenames

    Welcome to the forum!

    Please use Code tags rather than HTML tags. As posted, some text is translated to html. Click the # icon in a reply toolbar to insert the code tags.

    I guess you are doing all that in VBA for Outlook? If not, you need some tweaks if doing it in VBA for Excel.

    As for the last "code", before that line:
    Please Login or Register  to view this content.
    As will see in Immediate Window after a Run, you have an invalid filename.

  3. #3
    Registered User
    Join Date
    12-24-2019
    Location
    New York City
    MS-Off Ver
    2019 Standard
    Posts
    1

    Re: Save emails from Outlook as .msg with dates in filenames

    Thank you for pointing out the fix. It's obvious but my brain must have been on backwards or something since I'm used to seeing & as an actual ampersand doing some front-end web work.

    Again, thank you!

+ 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. VBA coding in Outlook 2010 to save attachments from emails
    By Ravipoojari in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-18-2015, 05:28 AM
  2. Macro help with sending emails from outlook base on excel dates
    By Wery123 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-16-2015, 12:42 AM
  3. Need a macro that sends out emails from outlook base off of dates in excel
    By Wery123 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2015, 10:20 PM
  4. Replies: 0
    Last Post: 11-14-2014, 08:56 AM
  5. Outlook Macro to Save Emails to Specified Location
    By opattison in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 11-29-2012, 05:55 AM

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