• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Take info from Outlook email excel attachment to Excel

baru

New Member
Hi There

I am struggling to automate this process of taking info from and excel attachment on Outlook email into an Excel sheet.

I need code asking to point to a specific email having excel attachment. And the code reads the info from the attachment and copies on to columns on the spreadsheet the macro is in. Also I want to read the from email address and copy into a field on the spreadsheet.

Please help
 
I wanted it done in vba and I want to the email manually like you browse to a file and export the info from the attachment in the email along with senders email ID. But the code in the link takes all the attachments from all the emails in an email folder and dumps into desktop folder.
 
So change a portion of code. Instead of using Subfolder.Items.Count, use something like...

Code:
    Set objApp = Outlook.Application
    On Error Resume Next
        Select Case TypeName(objApp.ActiveWindow)
            Case "Explorer"
                Set MyItem = ActiveExplorer.Selection.Item(1)
            Case "Inspector"
                Set MyItem = ActiveInspector.CurrentItem
            Case Else
        End Select
    On Error GoTo 0
 
Back
Top