Hi,
1. I have entered the below VBA code in excel, which creates PDF files (i.e., employees payslips from excel sheet) in a folder based on the datalist in the range.
Sub Iterate_Through_data_Validation()
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Set xRg = Worksheets("Sheet2").Range("D8")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
For Each xCell In xRgVList
xRg = xCell.Value
ActiveSheet.PrintOut
Next
End Sub
2. Please let me know the code in VBA excel to send the pdf files i.e., pay slips to different employee email ids automatically through outlook integrating the above code.
1. I have entered the below VBA code in excel, which creates PDF files (i.e., employees payslips from excel sheet) in a folder based on the datalist in the range.
Sub Iterate_Through_data_Validation()
Dim xRg As Range
Dim xCell As Range
Dim xRgVList As Range
Set xRg = Worksheets("Sheet2").Range("D8")
Set xRgVList = Evaluate(xRg.Validation.Formula1)
For Each xCell In xRgVList
xRg = xCell.Value
ActiveSheet.PrintOut
Next
End Sub
2. Please let me know the code in VBA excel to send the pdf files i.e., pay slips to different employee email ids automatically through outlook integrating the above code.