+ Reply to Thread
Results 1 to 3 of 3

Assistance required to mod "save to folder" macro.

  1. #1
    Registered User
    Join Date
    08-09-2016
    Location
    Truro
    MS-Off Ver
    Office 2013
    Posts
    2

    Assistance required to mod "save to folder" macro.

    Hello all,

    Had to register as a new user as my old account linked to my old place of work to which I no longer have email access to.

    So, I have discovered a very helpful macro to copy/move emails to a file, which saves the email as Sender/Subject as the file name, and the modified date is saved as when the email was recieved. I found it here.

    https://techniclee.wordpress.com/201...e-file-system/

    What I would like to do is do the same for the "Sent folder", so that I can archive that to a Folder, with attachments included.

    I have tried changing "SenderName" to "Recipients" and changed "ReceivedTime" to "SentOn". However it bugs out on this line.

    Please Login or Register  to view this content.
    Here is the original code with "Sendername" and "ReceivedTime"

    Please Login or Register  to view this content.
    Any suggestions appreciated.

  2. #2
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: Assistance required to mod "save to folder" macro.

    olkItm.Recipients is a collection. RemoveIllegalCharacters will process a string.

    For example

    Please Login or Register  to view this content.
    or

    Please Login or Register  to view this content.
    To mark "Solved" go to Thread Tools.

  3. #3
    Registered User
    Join Date
    08-09-2016
    Location
    Truro
    MS-Off Ver
    Office 2013
    Posts
    2

    Re: Assistance required to mod "save to folder" macro.

    Thanks skatonni. That works well using either the "To" or the "Recipients(1)". I guess the second one is the better one to use in case there is more than one recipient?

    The only difference from the original code is that now the messages aren't saving with "[From]...... [Subject]......" in the file name. Is there another modification needed to make it do that?

    For example in the original copy to file macro, the file names would save like this "[From] [email protected] [Subject] Fwd from Julia". With the mod you have done, they are saving line this "[email protected] - Fwd from Julia" It's not really a problem, it would just be nice to have the same format for all messages.

    Thanks again!

    Edit to add - Don't worry too much. The original code I posted up doesn't have the "[From]" in it. That's a slightly modified version. I'll look into it myself. Cheers.

    Edit 2: This is the line.... sorted it, works fine now.

    Please Login or Register  to view this content.
    Last edited by Graham CMA; 08-10-2016 at 07:59 AM. Reason: Phone number.

+ 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. [SOLVED] Macro "save file to folder" to work on co-workers laptops
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-15-2014, 12:08 PM
  2. [SOLVED] Script to save to folder in "v:\dept2", confirm file saved, then delete from "v:\dept1"
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-28-2014, 11:42 AM
  3. Problem running "Save macro to all workbook in folder"
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-20-2014, 12:49 AM
  4. Need macro to disable "Save" and "Save as" buttons
    By Anforya in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-20-2013, 01:06 PM
  5. Macro Assistance Multiple Selection Items and "Blanking Cells"
    By gravel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-31-2011, 09:55 AM
  6. [SOLVED] "Save as" will not work when trying to save a document in a folder
    By Ernest in forum Excel General
    Replies: 1
    Last Post: 04-13-2006, 01:48 AM
  7. Replies: 1
    Last Post: 06-10-2005, 08:05 PM

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