Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

254
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda