Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Attaching Files to Email from a List of Names in a Spreadsheet

Status
Not open for further replies.

Walter349

Technical User
Aug 16, 2002
250
BE
I am investigating the possibility of being able to automate a manual process currently being used.

We have an Excel spreadsheet used to manage/record certain word files. The word document file name is hyperlinked in the spreadsheet.

Every month we have to send the latest files by email to another location.

It is in my mind that this could be simplified by using the spreadsheet as a source file and VBA to open an outlook object and attach the files that were not previously sent.

At the moment there is no indicator in the spreadsheet to identify if the relevant file was sent, but that can be fixed.

But my question is, could this be done at all. Opening an outlook object is not a problem, but how would it be able to go through the files listed, to attach them?


'If at first you don't succeed, then your hammer is below specifications'
 
How do you notate the files that have been sent on the spreadsheet? Is is a formula in the cell next to the file's name?
 


hi,

Assuming that your list is a 2-col table in Sheet1, cols A & B, A1 is heading eMail and B1 is heading FileName...
Code:
sub LoopRange()
  dim r as range
 
  With Sheets("Sheet1")
    for each r in range(.[A2], .[A2].end(xldown))
      debug.print r.value, r.offset(0,1).value
    next
  end with
end sub
[code]


Skip,
[sub]
[glasses]Just traded in my old subtlety...
[b]for a NUANCE![/b][tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top