Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

351
Vistas
Microsoft Word API - how to I from Word.RequestContext.document to Office.Document

I am starting the "Build your first Word task pane add-in" tutorial.

Basically I want to make a Button on the Panel that will send this document as a PDF to my web service.

There is a function in the API called Office.Document.getFileAsync which seem to be an excellent way to save data to a PDF, which I can then send to my web service.

How do I access that part of the API. In the tutorial it seem that we should use the context object, but context.document.getFileAsync does not appear to exist. I think I need to get to the Office.Document object and I think context.document is Word.RequestContext.document.

export async function run() {
  return Word.run(async (context) => {
    /**
     * Insert your Word code here
     */

    {{Office.Document then use getFileAsync  }}

    await context.sync();
  });
}
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

There are two different branches to the Office JavaScript library. There are the Common APIs which apply, theoretically, to any Office application. There are also the application-specific APIs that apply to just one Office application. There are application-specific APIs for Word, Excel, and PowerPoint, among others. The Word tutorial uses the Word application-specific APIs because that is the set of APIs that is most often used. However, for what you want to do, you should use the Common APIs. Specifically, the one that you discovered, Office.document.getFileAsync.

You can find code samples that use Office.document.getFileAsync in Get the whole document from an add-in in Word. Also, checkout Office JavaScript API object model.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda