Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions source/NVDAObjects/window/excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

from comtypes import COMError, BSTR
import comtypes.automation
import inputCore
import wx
import time
import winsound
Expand Down Expand Up @@ -1844,17 +1845,27 @@ def _get_positionInfo(self):
# In Office 2016, 365 and newer, comments are now called notes.
# Thus, messages dialog title and so on should refer to notes.
@script(
# Translators: the description for a script for Excel
description=_("Reports the note on the current cell"),
description=_(
# Translators: the description for a script for Excel
"Reports the note on the current cell. If pressed twice, presents the information in browse mode"
),
gesture="kb:NVDA+alt+c",
category=SCRCAT_SYSTEMCARET,
speakOnDemand=True,
)
def script_reportComment(self, gesture):
def script_reportComment(self, gesture: "inputCore.InputGesture") -> None:
commentObj = self.excelCellObject.comment
text = commentObj.text() if commentObj else None
if text:
ui.message(text)
repeats = scriptHandler.getLastScriptRepeatCount()
if repeats == 0:
ui.message(text)
elif repeats == 1:
ui.browseableMessage(
text,
# Translators: title for note on the current Excel cell dialog.
_("Note"),
)
else:
# Translators: A message in Excel when there is no note
ui.message(_("Not on a note"))
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
### New Features

* Enhanced Microsoft Word comment command: press twice to present comment content in browsable message. (#16800, @Cary-Rowen)
* Enhanced Microsoft Excel notes command: press twice to present notes content in browsable message. (#16878, @Cary-Rowen)
* NVDA can now be configured to report font attributes in speech and braille separately. (#16755)


Expand Down
3 changes: 2 additions & 1 deletion user_docs/en/userGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,8 @@ Selecting a form field and pressing enter or the Move to button moves to that fi
#### Reporting Notes {#ExcelReportingComments}

<!-- KC:beginInclude -->
To report any notes for the currently focused cell, press NVDA+alt+c.
To report any notes for the currently focused cell, press `NVDA+alt+c`.
Pressing twice shows the information in a browsable message.
In Microsoft 2016, 365 and newer, the classic comments in Microsoft Excel have been renamed to "notes".
<!-- KC:endInclude -->
All notes for the worksheet can also be listed in the NVDA Elements List after pressing NVDA+f7.
Expand Down