Skip to content

A PowerPoint task-pane add-in that provides a timer. This sample makes use of the showNotification() alert, that pops up every ten seconds. The Settings.set and Settings.get methods are used to save the number of timer trials.

License

Notifications You must be signed in to change notification settings

OfficeDev/PowerPoint-Add-in-Timer

Repository files navigation

page_type products languages extensions
sample
office-365
office-powerpoint
javascript
html
contentType technologies platforms createdDate
samples
Add-ins
CSS
8/20/2015 2:33:47 PM

PowerPoint-Add-in-Timer

A PowerPoint task pane add-in that provides a timer.

Table of contents

Summary

In this sample, we show you how to use the JavaScript API for Office to create a timer in a task pane add-in. This sample makes use of the showNotification() alert, that pops up every 10 seconds. The Settings.set and Settings.get methods are used to save the number of timer trials.

Prerequisites

This sample requires the following:

  • Visual Studio 2013 with Update 5 or Visual Studio 2015.
  • PowerPoint 2013 or PowerPoint 2016.
  • Internet Explorer 9, which must be installed but doesn't have to be the default browser.
  • One of the following as the default browser: Internet Explorer 9, Safari 5.0.6, Firefox 5, or Chrome 13.
  • Familiarity with JavaScript programming.

Description of the code

Start the timer by using the buttons in the task pane. A notification in a red background color displays every 10 seconds to notify the time. To stop the timer, click the Stop timer button. All of the times are displayed, with the trial number attached. You can clear the timer trials by clicking the Clear timer button.

Build and debug

  1. Open the OfficeAppPPTTaskPaneTimer.sln file in Visual Studio.
  2. Press F5 to build and deploy the sample add-in.
  3. On the Home ribbon, click Open in the Timer group.

Questions and comments

  • If you have any trouble running this sample, please log an issue.
  • Questions about Office Add-ins development in general should be posted to Stack Overflow. Make sure that your questions or comments are tagged with [office-addins].

Additional resources

Copyright

Copyright (c) 2015 Microsoft. All rights reserved.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

About

A PowerPoint task-pane add-in that provides a timer. This sample makes use of the showNotification() alert, that pops up every ten seconds. The Settings.set and Settings.get methods are used to save the number of timer trials.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages