MozillaZine

Calendar - list of events

For discussing the Mozilla Calendar, Sunbird and Lightning projects.
agabb
 
Posts: 6
Joined: May 5th, 2017, 9:31 pm

Post Posted May 19th, 2019, 6:43 pm

This applies to Thunderbird/Calendar.

Is there any way to get a simple list of future events (just event & date) into the clipboard for pasting into Word? The format used for the "All Future Events" pane is OK.

Andrew

morat
 
Posts: 3237
Joined: February 3rd, 2009, 6:29 pm

Post Posted May 30th, 2019, 9:00 pm

I can copy the text in the title, start and end columns using the error console, then paste the text into another application.

* select "All Future Events" in drop down list in calendar tab
* open error console i.e. tools > developer tools > error console
* copy and paste code into error console (press enter to run)

Code: Select all
(function () {
  var tree = document.getElementById("unifinder-search-results-tree");
  var view = tree.view; // nsITreeView
  var columns = tree.columns; // nsITreeColumns
  for (var i = 0; i < view.rowCount; i++) {
    var title = view.getCellText(i, columns.getColumnAt(0));
    var start = view.getCellText(i, columns.getColumnAt(1));
    var end   = view.getCellText(i, columns.getColumnAt(2));
    console.log(title + ";" + start + ";" + end);
  }
})();

Error Console command line
http://developer.mozilla.org/en-US/docs/Tools/Browser_Console#Browser_Console_command_line

Reference
http://developer.mozilla.org/en/XUL/tree
http://developer.mozilla.org/en/XPCOM_Interface_Reference/nsITreeView
http://developer.mozilla.org/en/XPCOM_Interface_Reference/nsITreeColumns

Return to Calendar


Who is online

Users browsing this forum: No registered users and 1 guest