function addPage(name) {
  // get doc
  let doc = Context().document

  // get current page
  let currentPage = doc.currentPage()

  // create new page
  let page = doc.addBlankPage()
  page.setName(name)

  // make current page active again
  doc.setCurrentPage(currentPage)

  return page
}
Adds a page with the specified name to the current document.

@param {String} name
@returns {MSPage}