+ Reply to Thread
Results 1 to 4 of 4

How to get outlook email attachment using excel vba and save it in a specified folder

  1. #1
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    How to get outlook email attachment using excel vba and save it in a specified folder

    Hello, I am currently using the code below to save a file and send an email with a link to the file on our server. What I would also like to do is before the email is sent, look through outlook folders and find an attachment based on a range value in the worksheet. When it finds the attachment I would like to transfer it into the same folder that we are saving the current file into. This project is the first time that I have tried to do anything with outlook from excel so I am having trouble figuring out how to make this work.

    Please Login or Register  to view this content.

  2. #2
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to get outlook email attachment using excel vba and save it in a specified folder

    Ok, I was able to come up with the following code which works "mostly", it did find the file in the inbox but not in any subfolders. I thought that the Inbox would include all subfolders as well but it looks like it will not. I need to be able to check in subfolders in case whoever is using this code has rules and subfolders where the attachment will be.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to get outlook email attachment using excel vba and save it in a specified folder

    So I have been working on this and was able to come up with the following code. It searches through the inbox and then through the subfolders. If anyone has a better or faster way that would be great. Next thing I want to do is find a way to search a specific folder, I think it would be better to run the code faster that way.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    04-15-2012
    Location
    California, USA
    MS-Off Ver
    Microsoft 365 Subscription
    Posts
    120

    Re: How to get outlook email attachment using excel vba and save it in a specified folder

    Does anyone have an idea of how I can search outlook subfolders for a specific folder then find the attachment. If the subfolder does not exist I want to then look for the attachment in the inbox and all subfolders.

+ 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. Save outlook attachment as file using email subject as file name w/o invalid characters
    By kristinlarmer in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 10-16-2015, 05:07 PM
  2. Save an Outlook attachment and move the email to a folder based and sender
    By db16886 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2014, 09:49 PM
  3. Dowload outlook email attachment to my pc folder using Excel VBA
    By din.malay in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-11-2013, 08:06 AM
  4. Dowload outlook email attachment to my pc folder
    By din.malay in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 12-11-2013, 03:34 AM
  5. Replies: 0
    Last Post: 08-14-2013, 04:26 PM
  6. Replies: 0
    Last Post: 06-26-2013, 01:18 PM
  7. Outlook, print pdf Save Attachment, Move Email To A Subfolder
    By stephen1000 in forum Outlook Programming / VBA / Macros
    Replies: 7
    Last Post: 11-16-2009, 07:18 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