Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
Cannot find .html file- Office Dialog Box Add-in

[enter image description here][1]I am trying to make a Microsoft Office Add-in using the Office Javascript API. I am debugging it with VS Code. I am trying to open a dialog page using:

var url = new URI('src/taskpane/dialogbox.html').absoluteTo(window.location.origin).toString();
Office.context.ui.displayDialogAsync(url);

A new page opens however it displays 'Cannot GET /src/taskpane/dialogbox.html' and not the dialogbox.html

I am opening the dialog box from a taskpane. It gives the same error when I try to open a dialog box with the taskpane html instead (using the full directory: [src/taskpane/taskpane.html])

var url = new URI('src/taskpane/taskpane.html').absoluteTo(window.location.origin).toString();
Office.context.ui.displayDialogAsync(url);

Strangely, when I only write out taskpane.html and not the full directory it does load the html:

var url = new URI('taskpane.html').absoluteTo(window.location.origin).toString();
Office.context.ui.displayDialogAsync(url); 

What am I doing wrong? Am I misunderstanding something to do with the URLs. Thanks for your help

Link to image of folder structure in Visual Studio code: [1]: https://i.stack.imgur.com/36bd3.png

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!