Hi.
I'm new in the vb code processing.
I want to connect my database to outlook to add tasks, but i whant to be the user to determine the regularity of the task. That is possivel?
Thank you.
the code i have is
Private Sub AddOutLookTask_Click()
Dim appOutLook As Outlook.Application
Dim taskOutLook As Outlook.TaskItem
Dim hora_aviso As Date
Set appOutLook = CreateObject("Outlook.Application")
Set taskOutLook = appOutLook.CreateItem(olTaskItem)
With taskOutLook
cod_cliente = codcliente
.Subject = "Visita programada para a empresa: " & codcliente.Column(1)
.Body = " NÃO ESQUCER DE ALTERAR A PERIODICIDADE (Ctrl+b)"
.ReminderSet = True
.ReminderTime = DateAdd("n", 1, data_inicio) + #9:15:00 AM# ' Set to remind us 1
' minutes from now.
.DueDate = DateAdd("n", 1, data_inicio) + #9:15:00 AM# ' Set the due date to
' 1 minutes from now.
.ReminderPlaySound = True
'add the path to a .wav file on your computer.
.ReminderSoundFile = "C:\WINDOWS\Media\notify.wav"
.Save
End With
End Sub
I'm new in the vb code processing.
I want to connect my database to outlook to add tasks, but i whant to be the user to determine the regularity of the task. That is possivel?
Thank you.
the code i have is
Private Sub AddOutLookTask_Click()
Dim appOutLook As Outlook.Application
Dim taskOutLook As Outlook.TaskItem
Dim hora_aviso As Date
Set appOutLook = CreateObject("Outlook.Application")
Set taskOutLook = appOutLook.CreateItem(olTaskItem)
With taskOutLook
cod_cliente = codcliente
.Subject = "Visita programada para a empresa: " & codcliente.Column(1)
.Body = " NÃO ESQUCER DE ALTERAR A PERIODICIDADE (Ctrl+b)"
.ReminderSet = True
.ReminderTime = DateAdd("n", 1, data_inicio) + #9:15:00 AM# ' Set to remind us 1
' minutes from now.
.DueDate = DateAdd("n", 1, data_inicio) + #9:15:00 AM# ' Set the due date to
' 1 minutes from now.
.ReminderPlaySound = True
'add the path to a .wav file on your computer.
.ReminderSoundFile = "C:\WINDOWS\Media\notify.wav"
.Save
End With
End Sub