ascott0169
New Member
- Joined
- Oct 11, 2022
- Messages
- 1
- Platform
- Windows
Hi,
I'm pretty new to VBA. i have a pretty good idea of what needs to be done but unsure how to string it all together and need some assistance.
I'm trying to create a VBA macro that will automatically use the data from a spreadsheet to pull data from the spreadsheet and send to corresponding email addresses
the macro will need to proceed row by row in the following manner.
any value = 2 in column B will create an email in my outlook application
emailitem.to will depend on the value of column K, this holds the supplier name. i know i need to insert an IF function here so that for example when K = apple it uses the email address for this supplier and when K = google it uses the address for that supplier instead etc. this data will be kept on a separate sheet within the excel file
emailitem.cc will be the same process as emailitem.to
emailitem.subject will be the following "PO (value of cell G on that row) - (date)"
emailitem.body will be "
Hello,
Please advise PO status"
I would also like to end the body of the email with my outlook email signature if possible
as stated this would have to run row by row executing for any rows with a B column value of 2
the number of rows would be dynamic changing day to day as the excel file is updated
Please review, acknowledge and confirm EDT
I'm pretty new to VBA. i have a pretty good idea of what needs to be done but unsure how to string it all together and need some assistance.
I'm trying to create a VBA macro that will automatically use the data from a spreadsheet to pull data from the spreadsheet and send to corresponding email addresses
the macro will need to proceed row by row in the following manner.
any value = 2 in column B will create an email in my outlook application
emailitem.to will depend on the value of column K, this holds the supplier name. i know i need to insert an IF function here so that for example when K = apple it uses the email address for this supplier and when K = google it uses the address for that supplier instead etc. this data will be kept on a separate sheet within the excel file
emailitem.cc will be the same process as emailitem.to
emailitem.subject will be the following "PO (value of cell G on that row) - (date)"
emailitem.body will be "
Hello,
Please advise PO status"
I would also like to end the body of the email with my outlook email signature if possible
as stated this would have to run row by row executing for any rows with a B column value of 2
the number of rows would be dynamic changing day to day as the excel file is updated
Please review, acknowledge and confirm EDT