+ Reply to Thread
Results 1 to 3 of 3

Modify VBA to save attachment with Subject line as file name??

  1. #1
    Forum Contributor
    Join Date
    05-13-2012
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    378

    Question Modify VBA to save attachment with Subject line as file name??

    I have the following VBA code that I am currently using in my Outlook to save particular attachments from specific senders. However, currently the program using the name of the attachment and I want to change that to use a portion of the subject as the file name. I am unsure how to properly change this code to do everything the same but this time use the subject line as the file name...suggestions???


    Please Login or Register  to view this content.

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Lightbulb Re: Modify VBA to save attachment with Subject line as file name??

    Here you go. The subject is derived from objMsg.Subject. From there we add in an array of invalid filename characters, and cycle each email's subject string to remove them.

    Please Login or Register  to view this content.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    05-04-2016
    Location
    London
    MS-Off Ver
    MS Office Excel 2010/2013
    Posts
    354

    Re: Modify VBA to save attachment with Subject line as file name??

    Hi Daffodil,

    This is Brilliant , I was in sought of similar kind of requirement .

    can you also help me with the same change in the code that I have , which I brought from online , need tweak that can help me to save email attachment that using my subject . below is the code for your reference .
    Please Login or Register  to view this content.


    appreciate your assistance.

+ 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] Download attachment and rename with subject line
    By ali84pk in forum Outlook Programming / VBA / Macros
    Replies: 11
    Last Post: 07-25-2023, 12:01 PM
  2. Download Attachment and Rename With Subject Line v2
    By CBJason in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 07-26-2014, 04:33 PM
  3. Replies: 0
    Last Post: 05-21-2014, 04:45 PM
  4. Replies: 0
    Last Post: 08-14-2013, 04:26 PM
  5. Replies: 8
    Last Post: 05-17-2013, 01:53 AM
  6. Save attachment with specific subject
    By souljive99 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 01-19-2011, 11:00 AM
  7. Save emails using only part of subject line
    By ir26121973 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-03-2006, 02:45 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