text: // Run a batch operation against the Word object model.
  Word.run(function (context) {
      
      // Queue a command to get the current selection and then 
      // create a proxy range object with the results.
      var range = context.document.getSelection();
      
      // Queue a commmand to load font and style information for the range.
      context.load(range, 'font/size, font/name, font/color, style');
      
      // Synchronize the document state by executing the queued-up commands, 
      // and return a promise to indicate task completion.
      return context.sync().then(function () {
          
          // Show the results of the load method. Here we show the
          // property values on the range object.
          var results = "  ---Font size: " + range.font.size +
                        "  ---Font name: " + range.font.name +
                        "  ---Font color: " + range.font.color +
                        "  ---Style: " + range.style;
          console.log(results);
      });  
  })
  .catch(function (error) {
      console.log('Error: ' + JSON.stringify(error));
      if (error instanceof OfficeExtension.Error) {
          console.log('Debug info: ' + JSON.stringify(error.debugInfo));
      }
  });