OL2002: How to Send Outlook Reminders to a Pager (291964)



The information in this article applies to:

  • Microsoft Outlook 2002

This article was previously published under Q291964

SUMMARY

Many alphanumeric pagers allow you to send e-mail to them. This article explains how to set up Outlook to forward reminders via e-mail to a pager.

IMPORTANT: This solution will only work if you can disable the Outlook security settings for the Outlook object model. If you do not disable these settings, then the code will not run while you are away from your computer because it will generate security warnings that must be manually dismissed. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:

290498 OL2002: Add-in or Custom Solution Causes Warning to Appear

MORE INFORMATION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

Create a Contact for the Pager

To create a contact entry for the pager, follow these steps:
  1. On the File menu, click New, and then click Contact.
  2. In the Full Name field, type Pager for Reminders.
  3. In the E-mail field, type the e-mail address for your pager. If you do not know, contact the company that supplied your pager.
  4. Click Save and Close.

Enter the Code

  1. On the Tools menu, click Macro, and then click Visual Basic Editor.
  2. Double-click Project1, click Microsoft Outlook Object, and click ThisOutlookSession.
  3. Enter the following code in the code window:
    Private Sub Application_Reminder(ByVal Item As Object)
       If Item.Sensitivity <> olConfidential Then
          If TypeOf Item Is AppointmentItem Then SendApptReminder Item
          If TypeOf Item Is MailItem Then SendMailReminder Item
          If TypeOf Item Is TaskItem Then SendTaskReminder Item
       End If
    End Sub
    
    Private Sub SendApptReminder(ByRef Item As AppointmentItem)
       SendPage Item.Subject, FormatDateTime(Item.Start, vbShortTime) & _
          "-" & FormatDateTime(Item.End, vbShortTime) & vbCrLf & _
          Item.Location
    End Sub
    
    Private Sub SendMailReminder(ByRef Item As MailItem)
       SendPage "Mail Reminder", Item.Subject
    End Sub
    
    Private Sub SendTaskReminder(ByRef Item As TaskItem)
       SendPage Item.Subject, Item.Body
    End Sub
    
    Private Sub SendPage(ByRef Subject As String, ByRef Body As String)
       Dim oEmail As Object
       Set oEmail = Application.CreateItem(olMailItem)
       oEmail.Subject = Subject
       oEmail.Body = Body
       oEmail.Recipients.Add "Pager For Reminders"
       oEmail.Send
    End Sub
    					
  4. On the File menu, click Save VbaProject.otm.
  5. Close the Visual Basic Editor and quit Outlook.
Restart Outlook and when prompted with a security warning, click Enable Macros. You must enable macros each time you start Outlook for the code to work, or you can lower your security settings.

To lower your security settings, follow these steps:
  1. On the Tools menu, point to Macros and click Security.
  2. Make the changes you want and click OK.
Whenever an appointment, mail, or task reminder appears, Outlook will send e-mail to your pager. Outlook must be running for the reminders to appear and for the code to run.

REFERENCES

For additional information about available resources and answersto commonly asked questions about Microsoft Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base:

287530 OL2002: Questions About Custom Forms and Outlook Solutions


Modification Type:MinorLast Reviewed:7/28/2006
Keywords:kbDSWNET2003Swept kbhowto KB291964