how to save contents of current docx file to a new docx file using word javascript apis. Document.getfileasync method will get contents in different format which Im not able to understand.

Amulya K R 26 Reputation points
2022-10-27T11:07:37.207+00:00

Using Document.getFileAsync method in https://github.com/umasubra/office-js-docs-1/blob/master/reference/shared/document.getfileasync.md, able to fetch data in non readable format. I want to save contents of current document to a new document at given location.

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Development | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ruizhi Sun 6 Reputation points Microsoft Employee
    2022-11-14T10:18:08.883+00:00

    Hi AmulyaKR-1579,

    Here is my colleague's reply
    '''
    Currently, there’s no such js api(save to a new docx file) available yet. There’re some internal discussions about this topic, but there’s no concrete plan yet. If you

    Talking about Document.getfileaysnc, I believe she/he is mentioning the common API: Office.Document.getFileAsync. There’re clear definition and sample codes here: Office.Document interface - Office Add-ins | Microsoft Learn which she/he can refer to.
    '''
    Your sincerely

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.