Macros: ¿Cómo enviar citas de reuniones de Microsoft outlook desde excel?

Cuento con una hoja de cálculo donde en cierta columna se pone la actividad, en otra, la fecha en que debe de entregarse el "reporte de la actividad" y en otra el correo del interesado y en otra el del segundo involucrado.

Quiero que al registrar una nueva actividad se envíe la notificación en forma de cita para que por Outlook se le este recordando desde 5 días antes de llegar la fecha comprometida, y que a la vez notifique a los involucrados con el mismo método. Mi mejor alternativa, pienso yo, es utilizar Reuniones de Outlook.

Envío mi proyecto, soy nuevo en ésto, agradeceré detalles

Sub Notificacion()
'Crear citas en outlook desde excel
Const olAppointmentItem As Long = 1
Dim OLApp As Object
Dim OLNS As Object
Dim OLAppointment As Object
On Error Resume Next
Sheets("Actividades").Select
ufila = Range("B" & Rows.Count).End(xlUp).Row
For i = 3 To ufila
If Cells(i, 7) = "ABIERTA" And Cells(i, 15) = "No Notificada" Then
Set OLApp = GetObject(, "Outlook.Application")
If OLApp Is Nothing Then Set OLApp = CreateObject("Outlook.Application")
On Error GoTo 0
If Not OLApp Is Nothing Then
Set OLNS = OLApp.GetNamespace("MAPI")
OLNS.Logon
Set OLAppointment = OLApp.CreateItem(olAppointmentItem)
OLAppointment.Subject = "Seguimiento a desviación " & Cells(i, 2).Value 'Asunto
OLAppointment.Body = Cells(i, 3).Value 'Cuerpo
OLAppointment.Start = Cells(i, 4).Value 'inicio ej: 08/12/2012 17:00:00 p.m.
'OLAppointment.Duration = Range("D1").Value 'duración ej para hora y media: 90
OLAppointment.Location = "Documentación" 'Ubicación
OLAppointment.ReminderMinutesBeforeStart = 4320 'Tiempo en que debe avisarse en minutos
'OLAppointment.Save 'para guardar la cita
OLAppointment.display 'Para mostrar la cita
para = Cells(i, 10) & ";" & Cells(i, 11) & ";" & Cells(i, 12)
OLAppointment.Recipients.Add (para)
Set OLAppointment = Nothing
Set OLNS = Nothing
Set OLApp = Nothing
End If
End If
Next
End Sub

Añade tu respuesta

Haz clic para o