Created
September 19, 2020 14:17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub CrearTareas() | |
Dim miApp As Outlook.Application | |
Dim miTarea As TaskItem | |
num_tareas = WorksheetFunction.Max(Range("A13:A20")) + 12 | |
Set miApp = New Outlook.Application | |
For i = 13 To num_tareas | |
Set miTarea = miApp.CreateItem(olTaskItem) | |
With miTarea | |
.Subject = Range("B" & i) | |
.Body = Range("C" & i) | |
.Status = olTaskNotStarted | |
.Importance = olImportanceHigh | |
.DueDate = DateValue(Range("F" & i)) | |
.ReminderTime = .DueDate - 2 | |
.Assign | |
.Recipients.Add Range("E" & i) | |
.Save | |
.Send | |
End With | |
Set miTarea = Nothing | |
Next i | |
Set miApp = Nothing | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment