Skip to content

Latest commit

 

History

History
92 lines (57 loc) · 3.71 KB

project-quickstart.md

File metadata and controls

92 lines (57 loc) · 3.71 KB
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

Build your first Project task pane add-in

In this article, you'll walk through the process of building a Project task pane add-in.

Prerequisites

[!includeYeoman generator prerequisites]

  • Project 2016 or later on Windows

Create the add-in

[!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

The prompts and answers for the Yeoman generator in a command line interface.

After you complete the wizard, the generator creates the project and installs supporting Node components.

Explore the project

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 and Notes field of the selected task of a project.

Try it out

  1. Navigate to the root folder of the project.

    cd "My Office Add-in"
    
  2. 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
    
  3. In Project, create a simple project plan.

  4. Load your add-in in Project by following the instructions in Sideload Office Add-ins on Windows.

  5. Select a single task within the project.

  6. At the bottom of the task pane, choose the Run link to rename the selected task and add notes to the selected task.

    The Project application with the task pane add-in loaded.

  7. When you want to stop the local web server and uninstall the add-in, follow these instructions:

Next steps

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]

See also