text: // Run a batch operation against the Word object model.
  Word.run(function (context) {
      
      // Create a proxy object for the paragraphs collection.
      var paragraphs = context.document.body.paragraphs;
      
      // Queue a commmand to load the style property for the top 2 paragraphs.
      // We never perform an empty load. We always must request a property.
      context.load(paragraphs, {select: 'style', top: 2} );
      
      // Synchronize the document state by executing the queued-up commands, 
      // and return a promise to indicate task completion.
      return context.sync().then(function () {
          
          // Queue a command to get the first paragraph.
          var paragraph = paragraphs.items[0];        
          
          // Queue a command to insert the paragraph after the current paragraph.
          paragraph.insertParagraph('Content of a new paragraph', Word.InsertLocation.after);
          
          // Synchronize the document state by executing the queued-up commands, 
          // and return a promise to indicate task completion.
          return context.sync().then(function () {
              console.log('Inserted a new paragraph at the end of the first paragraph.');
          });      
      });  
  })
  .catch(function (error) {
      console.log('Error: ' + JSON.stringify(error));
      if (error instanceof OfficeExtension.Error) {
          console.log('Debug info: ' + JSON.stringify(error.debugInfo));
      }
  });