page_type | products | languages | extensions | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
|
|
|
A PowerPoint task pane add-in that provides a timer.
Table of contents
- Summary
- Prerequisites
- Description of the code
- Build and debug
- Questions and comments
- Additional resources
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.
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.
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.
- Open the OfficeAppPPTTaskPaneTimer.sln file in Visual Studio.
- Press F5 to build and deploy the sample add-in.
- On the Home ribbon, click Open in the Timer group.
- 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].
- More Add-in samples
- Office Add-ins
- Anatomy of an Add-in
- Creating an Office add-in with Visual Studio
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.