Saludos.
En un post de este foro encontré este código para crear citas en outlook
desde Excel.
Pero me manda un error: No se ha definido el tipo definido por el usuario.
Supongo que tengo que crear un nuevo tipo o algo así pero no doy con que
falla.
Alguien tendrá una sugerencia o una opción de código diferente?
Gracias
Anexo el código
Sub CreateAppointment()
Dim ol As New Outlook.Application
Dim ns As Outlook.NameSpace
Dim itmApoint As Outlook.AppointmentItem
Set ns = ol.GetNamespace("MAPI")
Set itmApoint = ol.CreateItem(olAppointmentItem)
With itmApoint
'the date and time entry is awkward here, just to make sure
'there's no problems with regional setings.
'Date/time from Excel cells will do fine instead:
.Start = DateSerial(2002, 3, 4) + TimeSerial(14, 0, 0)
.End = DateSerial(2002, 3, 4) + TimeSerial(16, 0, 0)
.Subject = "My appointment"
.Body = "Excel made this for me"
.Importance = olImportanceNormal
.Save
End With
End Sub
Leer las respuestas