gssachin
Board Regular
- Joined
- Nov 14, 2013
- Messages
- 155
Dear All,
I m using following codes to generate auto mail. In that I want to add signature. Please help
Sub automail()
Dim R As Range
Set R = Sheets("PIVOT").Cells
Dim i As Integer
For i = 2 To 6
Range("B5").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").CurrentPage = Sheet4.Range("A" & i).Value
ActiveWorkbook.EnvelopeVisible = True
With R.Parent.MailEnvelope
.Introduction = Sheet4.Range("a9").Value
With .Item
.To = Sheet4.Range("B" & i).Value
.cc = Sheet4.Range("c" & i).Value
.bcc = ""
.Subject = "VARIOUS REIMBURSEMENT PAID"
.send
End With
End With
Next i
End Sub
I m using following codes to generate auto mail. In that I want to add signature. Please help
Sub automail()
Dim R As Range
Set R = Sheets("PIVOT").Cells
Dim i As Integer
For i = 2 To 6
Range("B5").Select
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").ClearAllFilters
ActiveSheet.PivotTables("PivotTable1").PivotFields("LOCATION").CurrentPage = Sheet4.Range("A" & i).Value
ActiveWorkbook.EnvelopeVisible = True
With R.Parent.MailEnvelope
.Introduction = Sheet4.Range("a9").Value
With .Item
.To = Sheet4.Range("B" & i).Value
.cc = Sheet4.Range("c" & i).Value
.bcc = ""
.Subject = "VARIOUS REIMBURSEMENT PAID"
.send
End With
End With
Next i
End Sub