title: How to insert Rich Text Format(.rtf) file content into word doc using word javascript API
body: <p>I am using word javaScript Api for developing a Word add-in, i need to load a file from server and insert the content into the document, currently .docx files are working fine and inserted into the document but when i try to insert a .rtf format file content into a document, word throws below error: </p>
  
  <pre><code>Error: {"name":"OfficeExtension.Error","code":"RunMustReturnPromise","message":"The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\".","traceMessages":[],"debugInfo":{},"stack":"RunMustReturnPromise: The batch function passed to the \".run\" method didn't return a promise. The function must return a promise, so that any automatically-tracked objects can be released at the completion of the batch operation. Typically, you return a promise by returning the response from \"context.sync()\".\n   at t.throwError (https://appsforoffice.microsoft.com/lib/beta/hosted/word-win32-16.01.js:21:233250)\n   at Anonymous function (https://appsforoffice.microsoft.com/lib/beta/hosted/word-win32-16.01.js:21:202009)\n   at yi (https://appsforoffice.microsoft.com/lib/beta/hosted/word-win32-16.0
  </code></pre>
  
  <p>I am using below code to insert the content:</p>
  
  <pre><code>range.insertFileFromBase64(myBase64, Word.InsertLocation.start);
  </code></pre>
  
  <p>Please advice how i can insert the RTF format file content in word document.
  Thanks.</p>