Skip to content

mcherri/opt

Repository files navigation

OPT (Outlook Prayer Times)

Ever wanted to reserve Islamic prayer times in your Outlook calendar? Ever wanted to get reminded about prayer times like normal Outlook meetings? OPT is the right tool for you. It calculates Islamic prayer times and book a corresponding meeting request in your Outlook calendar.

OPT is developed as Outlook macros using open source VBA. It is based on prayer time code posted on [PrayerTimes.org] 1.

Version

0.9

Installation

Easy but Risky Installation Steps

  1. Please note that this method is risky as highlighted in this [KB] 2. This method works if you do not have existing macros in Outlook.

  2. Enable the developer tab as highlighted [here] 3.

  3. Enable Outlook to run macros:

  4. Go to developer tab.

  5. Click on Macros Security.

  6. In Macros Settings, select Notifications for all macros.

  7. Click Ok.

  8. Close Outlook if it is open.

  9. Open %appdata%\Microsoft\Outlook

  10. Take a backup of VbaProject.OTM if available.

  11. Download VbaProject.OTM from OPT and replace your default VbaProject.OTM.

  12. Restart Outlook.

  13. At startup, Outlook will ask to enable macros. Grant it.

  14. Switch to Calendar view, to verify the new green prayer times meetings'.

  15. If the prayer times do not reflect your current location look at the long installation steps.

Long Installation Steps

  1. Download the code directly from GitHub and save it to a local directory.

  2. Enable the developer tab as highlighted [here] 3.

  3. Enable Outlook to run macros:

  4. Go to developer tab.

  5. Click on Macros Security.

  6. In Macros Settings, select Notifications for all macros.

  7. Click Ok.

  8. Still in developer tab, import OPT code as following:

  9. Click Visual Basic.

  10. Expand Microsoft Outlook Objects, double click ThisOutlookSession, and copy and paste ThisOutlookSession.bas into the newly opened code window.

  11. From the menu, click Insert -> Module. In the module properties, change the module name to FillCalendar. Copy and paste FillCalendar.bas into the newly opened code window.

  12. From the menu click Insert -> Class Module. In the class module properties, change the class module name to ItemEvents. Copy and paste ItemEvents.bas into the newly opened code window.

  13. Repeat step iv, for PrayerTime.bas.

  14. The Outlook project should look like this:

    Outlook project screenshot

  15. Double click on FillCalendar to open it. Adjust the code shown blow to reflect your country and time zone. Please note that DayLightSaving is not currently used.

    ' Edit these to reflect your country
    Public Const TimeZone As Double = 3#
    Public Const DayLightSaving As Double = 0
    Public Const Latitude As Double = 30.0566
    Public Const Longitude As Double = 31.2262
  16. Do not forget to save by clicking the save icon.

  17. Close Microsoft Visual Basic for Applications window.

  18. Restart Outlook.

  19. At startup, Outlook will ask to enable macros. Grant it.

  20. Switch to Calendar view, to verify the new green prayer times meetings'.

Re-enable Full Macros Security

  1. Perform the steps in this [article] 4 to self-sign you macros.
  2. If you face any issues try to follow the steps in the most helpful reply in this [thread] 5.

License

LGPL

About

Outlook Prayer Times

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published