title | description | ms.date | ms.service | ms.localizationpriority |
---|---|---|---|---|
Build your first Project task pane add-in |
Learn how to build a simple Project task pane add-in by using the Office JS API. |
12/11/2023 |
project |
high |
In this article, you'll walk through the process of building a Project task pane add-in.
[!includeYeoman generator prerequisites]
- Project 2016 or later on Windows
[!includeYeoman generator create project guidance]
- Choose a project type:
Office Add-in Task Pane project
- Choose a script type:
JavaScript
- What do you want to name your add-in?
My Office Add-in
- Which Office client application would you like to support?
Project
After you complete the wizard, the generator creates the project and installs supporting Node components.
The add-in project that you've created with the Yeoman generator contains sample code for a very basic task pane add-in.
- The ./manifest.xml file in the root directory of the project defines the settings and capabilities of the add-in.
- The ./src/taskpane/taskpane.html file contains the HTML markup for the task pane.
- The ./src/taskpane/taskpane.css file contains the CSS that's applied to content in the task pane.
- The ./src/taskpane/taskpane.js file contains the Office JavaScript API code that facilitates interaction between the task pane and the Office client application. In this quick start, the code sets the
Name
field andNotes
field of the selected task of a project.
-
Navigate to the root folder of the project.
cd "My Office Add-in"
-
Start the local web server.
[!INCLUDE alert use https]
Run the following command in the root directory of your project. When you run this command, the local web server will start.
npm run dev-server
-
In Project, create a simple project plan.
-
Load your add-in in Project by following the instructions in Sideload Office Add-ins on Windows.
-
Select a single task within the project.
-
At the bottom of the task pane, choose the Run link to rename the selected task and add notes to the selected task.
-
When you want to stop the local web server and uninstall the add-in, follow these instructions:
-
To stop the server, run the following command.
npm stop
-
To uninstall the sideloaded add-in, see Remove a sideloaded add-in.
-
Congratulations, you've successfully created a Project task pane add-in! Next, learn more about the capabilities of a Project add-in and explore common scenarios.
[!div class="nextstepaction"] Project add-ins
[!includeThe common troubleshooting section for all Yo Office quick starts]