This is useful if you want to send Lookout reminders to your phone via an SMS email gateway.
Create the VB script to do it:
- Press ALT+F11 to open the VB Window.
- Double-click Project1, click Microsoft Outlook Object, and click ThisOutlookSession.
- Enter the code below in the code window, modifying the "To" portion of the message.
- On the File menu, click Save VbaProject.otm.
- Close the Visual Basic Editor and quit Outlook.
Make sure the macro can run
Restart Outlook. When prompted with a security warning, click "Enable Macros".
-- or --
Lower your security settings by clicking Tools -> Macros -> Security. Make the
changes and click "OK".
-- or --
(Outlook 2010) From the File menu, go to "Trust Center" then click "Trust Center Settings" and choose "Macros" then enable all macros.
# ---- begin codePrivate 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 = "This email address is being protected from spambots. You need JavaScript enabled to view it."
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
|