View Single Post
 
Old 04-12-2016, 10:46 AM
gbaker gbaker is offline Windows 7 32bit Office 2010 32bit
Competent Performer
 
Join Date: May 2012
Posts: 111
gbaker is on a distinguished road
Default Open csv files & copy and paste info into master file

I am looking for a way to open multiple files located in a folder on my network, open each of them and copy and paste the information to one master file. I have some code that when the e-mails with the attachments come in the attachments are moved to a folder on the network. Now I would like to have some code to open each one of them up and copy and paste the information to one master file.
Here is what I have so far:
HTML Code:
Option Explicit

Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "\\fngn.com\us\Projects\Print Production\Reports\DSG Drop reports"
     For Each objAtt In itm.Attachments
          objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
          Set objAtt = Nothing
     Next
End Sub
Attached is an example fo the files that come in via e-mail
Had to change it to excel to be able to attach it.
Attached Files
File Type: xlsx Example of file from e-mail attachment.xlsx (9.6 KB, 11 views)
Reply With Quote