Propósito

✔ Programação GLOBAL® - Quaisquer soluções e/ou desenvolvimento de aplicações pessoais, ou da empresa, que não constem neste Blog devem ser tratados como consultoria freelance. Queiram contatar-nos: brazilsalesforceeffectiveness@gmail.com | ESTE BLOG NÃO SE RESPONSABILIZA POR QUAISQUER DANOS PROVENIENTES DO USO DOS CÓDIGOS AQUI POSTADOS EM APLICAÇÕES PESSOAIS OU DE TERCEIROS.

.: Vitrine

Carregando artigos...

Views

Mostrando postagens com marcador reminder. Mostrar todas as postagens
Mostrando postagens com marcador reminder. Mostrar todas as postagens

VBA OutLook - Enviando lembretes por e-Mail.

Inline image 1

É verdade que haverão momentos nos quais desejará ser lembrado de coisas importante, como por exemplo, colocar alguma segurança ao seu redor.

Talvez possa fazer isso no MS Outlook, disparando um lembrete (remind). Também poderá enviar uma mensagem por e-mail.

O exemplo de código abaixo envia informações do Remind para o e-mail que especificarmos. 

Coloque esse código no módulo ThisOutlookSession.

Private Sub Application_Reminder(ByVal Item As Object)
  Dim objMsg As MailItem

  ' create new outgoing message
  Set objMsg = Application.CreateItem(olMailItem)

   ' your reminder notification address
  objMsg.To = "bernardess@gmail.com"
  objMsg.Subject = "Reminder: " & Item.Subject

  ' must handle all 4 types of items that can generate reminders

  Select Case Item.Class

     Case olAppointment '26
        objMsg.Body = _
          "Start: " & Item.Start & vbCrLf & _
          "End: " & Item.End & vbCrLf & _
          "Location: " & Item.Location & vbCrLf & _
          "Details: " & vbCrLf & Item.Body

     Case olContact '40
        objMsg.Body = _
          "Contact: " & Item.FullName & vbCrLf & _
          "Phone: " & Item.BusinessTelephoneNumber & vbCrLf & _
          "Contact Details: " & vbCrLf & Item.Body

      Case olMail '43
        objMsg.Body = _
          "Due: " & Item.FlagDueBy & vbCrLf & _
          "Details: " & vbCrLf & Item.Body

      Case olTask '48
        objMsg.Body = _
          "Start: " & Item.StartDate & vbCrLf & _
          "End: " & Item.DueDate & vbCrLf & _
          "Details: " & vbCrLf & Item.Body
  End Select

  ' send the message 
  objMsg.Send
  Set objMsg = Nothing
End Sub

Reference:
Inspiration:

TagsVBA, Outlook, send, reminder, email, lembrete

VBA OutLook - Enviando lembretes por e-Mail

Inline image 1


Como enviar lembretes por e-mail?

Este exemplo de código VBA Outlook envia as informações dos lembrentes para o e-mail que você especificar. Coloque esse código no módulo 
ThisOutlookSession.


Sub AppRem (ByVal Item As Object)

  Dim objMsg As MailItem

  

  Set objMsg = Application.CreateItem(olMailItem)

  

  Let objMsg.To = "bernardess@gmail.com"

  Let objMsg.Subject = "Reminder: " & Item.Subject

  

  Select Case Item.Class

     Case olAppointment '26



        objMsg.Body = "Start: " & Item.Start & vbCrLf & "End: " & Item.End & vbCrLf & "Location: " & Item.Location & vbCrLf & _

          "Details: " & vbCrLf & Item.Body



     Case olContact '40



        objMsg.Body = "Contact: " & Item.FullName & vbCrLf & "Phone: " & Item.BusinessTelephoneNumber & vbCrLf & _

          "Contact Details: " & vbCrLf & Item.Body



      Case olMail '43



        objMsg.Body = "Due: " & Item.FlagDueBy & vbCrLf & "Details: " & vbCrLf & Item.Body



      Case olTask '48

        objMsg.Body = "Start: " & Item.StartDate & vbCrLf & "End: " & Item.DueDate & vbCrLf & "Details: " & vbCrLf & 



Item.Body

  End Select



  objMsg.Send



  Set objMsg = Nothing

End Sub

Referências: 
Tags: VBA, Outlook, email, send



VBA OutLook - Enviando lembretes por e-Mail.

Programe o seu Outlook para que sempre que dispare um lembrete (remind), também envie uma mensagem por e-mail. Este exemplo de código VBA Outlook envia as informações do 'Remind' para o e-mail que especificarmos. 

Coloque esse código no módulo ThisOutlookSession.

Private Sub Application_Reminder(ByVal Item As Object)
  Dim objMsg As MailItem

  ' create new outgoing message
  Set objMsg = Application.CreateItem(olMailItem)

   ' your reminder notification address
  objMsg.To = "bernardess@gmail.com"
  objMsg.Subject = "Reminder: " & Item.Subject

  ' must handle all 4 types of items that can generate reminders

  Select Case Item.Class

     Case olAppointment '26
        objMsg.Body = _
          "Start: " & Item.Start & vbCrLf & _
          "End: " & Item.End & vbCrLf & _
          "Location: " & Item.Location & vbCrLf & _
          "Details: " & vbCrLf & Item.Body

     Case olContact '40
        objMsg.Body = _
          "Contact: " & Item.FullName & vbCrLf & _
          "Phone: " & Item.BusinessTelephoneNumber & vbCrLf & _
          "Contact Details: " & vbCrLf & Item.Body

      Case olMail '43
        objMsg.Body = _
          "Due: " & Item.FlagDueBy & vbCrLf & _
          "Details: " & vbCrLf & Item.Body

      Case olTask '48
        objMsg.Body = _
          "Start: " & Item.StartDate & vbCrLf & _
          "End: " & Item.DueDate & vbCrLf & _
          "Details: " & vbCrLf & Item.Body
  End Select

  ' send the message 
  objMsg.Send
  Set objMsg = Nothing
End Sub

Fonte: OutlookCode


Tags: Outlook, send, reminder, lembrete





André Luiz Bernardes
A&A® - Work smart, not hard.

diHITT - Notícias