PDA

View Full Version : 2 Macros Please Help getting so lost... to delete columns and email files



N1ck9141
03-23-2016, 09:27 AM
Hi There I need help with two macros...

Firstly, I have a list laid out like below in excel.

Column A (emails) Column B (filename)
AatA Z.elx
BatB Y.elx
CatC X.elx

All the files listed in column B are stored in "C:\Files"

I need a macro that will firstly, Open each file in the list one by one
Scan every column in the file from A to AZ "rows 2 to 20000" (yes purposely ignoring row 1). And if this scan returns blank (all the cells are empty) delete the entire column "Rows 1 to End". If it finds any data leave it alone move onto the next column. When it has scanned A to AZ save the file with same name, and move onto next file in list.

Then i need a second macro that will go down the list and using the mail client "Lotus Notes". Email the file in Column B of the list (from the same "C:\Files" location) to the corresponding email address in column A. With a subject of "File" and email body of "Here is your file"

Can anyone help I've been trying for days and it either deletes everything or nothing. And wont email at all unless i do it one at a time???

SamT
03-23-2016, 03:52 PM
What kind on file is a *.elx ?

What are you using to open it?

Show us the code that you have been trying to make work.