Repository: nvaccess/nvda

Issue:
NVDA not inform about if an e-mail in Outlook 2013 is answered or forwarded
Hi everyone

If I want to read messages in Outlook 2013 and use the arrow keys to scroll up and down in my folders (Inbox, Sent Mail and more), unlike JAWS, NVDA does not announce if an e-mail is replied / forwarded.
Every time that NVDA comes to an e-mail that is either replied / forwarded, Nvda only announce that the e-mail have an attached file. The e-mails not has an attached file.

Is it an error in NVDA?
If yes, I will be glad for a correction.

Thanks in advance.

Regards,
Anders


Discussion:
This problem occurs in Outlook 2016 as well. Reply and forward flags are not announced. In Outlook 2016, the attachment issue occurs at the other end of the forward. For example, if I forward a message from one of my accounts to another, the received message shows that it has an attachment. Similarly, other forwarded messages that I’ve received show the same attachment announcement.



Related to #4971 (status of is read, replied to, or forwarded) and #6374 (Outlook 2016 flagged items are not read in the message list)
In Outlook 2016, the Replied and Forwarded status is in the value attribute of the list item UIA object which is being used in class UIAGridRow. UIAGridRow overrides value setting to Nothing so this is lost. If it could be added as an item before overriding value? (Note overriding value itself is still nice as it is to verbose and is announced at the end. I'd prefer to have Replied/Forwarded announced at the beginning. or have it user configurable.)
Unfortunately I do not know about earlier Outlooks. 
Travis

Hi, alternatively, one can use table nav commands (Control+Alt+left/right arrows) to navigate to and announce this info, as it also inherits that power from NVDAObjects.behaviors.RowWithFakeNavigation. Thanks.

> From: travisroth [mailto:notifications@github.com]  
> 
> In Outlook 2016, the Replied and Forwarded status is in the value attribute of the list item UIA object which is being used in class UIAGridRow. UIAGridRow overrides value setting to Nothing so this is lost. If it could be added as an item before overriding value? (Note overriding value itself is still nice as it is to verbose and is announced at the end. I'd prefer to have Replied/Forwarded announced at the beginning. or have it user configurable.)
> Unfortunately I do not know about earlier Outlooks.
> Travis

Hi, I see what’s up… After replying to an earlier comment, I tried to look for reply/forward info but couldn’t find it (hoping it was one of the child names inside this row). Thanks.

Hi,

I did not find it as a child. Only as the value of the list item and row navigation did not work for me.

As I said value is being overridden most likely to eliminate some verboseness, which I agree with. When I commented out that line (value=””) the value was announced at the end of the row announcement.

Hope this helps.

Travis
Hi, I see. @MichaelDCurran, thoughts? Thanks.

What is the current status of this issue? Honestly I thought it was fixed as part of #6374, but I made a wrong assumption there.
Hi Leonard!
The problem still exists.

Rui


-----Mensagem Original----- 
De: Leonard de Ruijter
Data: 1 de setembro de 2017 08:03
Para: nvaccess/nvda
Cc: Subscribed
Assunto: Re: [nvaccess/nvda] NVDA not inform about if an e-mail in Outlook 
2013 is answered or forwarded (#6911)



What is the current status of this issue? Honestly I thought it was fixed as 
part of #6374, but I made a wrong assumption there.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.





This was reverted by #8353. See https://github.com/nvaccess/nvda/pull/8353#issue-191945815
@leonardder I'm not sure what's going on with this one, why is it labeled needs external fix? @Qchristensen believes that the replied status is reported with Narrator.
Replied / forwarded / read status is exposed by the control in plain 
language. It cannot be programmatically detected. Although Narrator 
announces this, it announces it in a non-configurable inefficient way.

We tried parsing the text to try to pull out replied / forwarded etc, 
but ran in to problems with several languages.


Not sure how this helps, but jaws 2018 speaks the status of a message that has been replied to.  Not sure how there doing this, but wanted to give my input on this since this is something people want.  Matthew

 

 

 

From: Michael Curran <notifications@github.com> 
Sent: Sunday, September 2, 2018 11:10 PM
To: nvaccess/nvda <nvda@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: Re: [nvaccess/nvda] NVDA not inform about if an e-mail in Outlook 2013 is answered or forwarded (#6911)

 

Replied / forwarded / read status is exposed by the control in plain 
language. It cannot be programmatically detected. Although Narrator 
announces this, it announces it in a non-configurable inefficient way.

We tried parsing the text to try to pull out replied / forwarded etc, 
but ran in to problems with several languages.




—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <https://github.com/nvaccess/nvda/issues/6911#issuecomment-417988957> , or mute the thread <https://github.com/notifications/unsubscribe-auth/APFilXLpHDnAPZUGVvCecY8OKsprxg3Cks5uXJ2FgaJpZM4MKHBs> .  <https://github.com/notifications/beacon/APFilcuxCXe8Vj8ZU8VWIOL5o7lJjCsTks5uXJ2FgaJpZM4MKHBs.gif> 


JAWS' logic is based on the UIA value and language specific. When you use a Dutch Outlook with an English JAWS, it announces the read state for every read message, which is quite redundant IMO.

I proposed three possibilities in https://github.com/nvaccess/nvda/pull/8608#pullrequestreview-144384571

1. Revert the value = None for outlook 2013 and above. In that case, read/unread state will be announced after the current content.
2. Similar to 1, but map the value to the description object attribute. This allows people to toggle descriptions on and off in a per app profile, for example.
3. Add an object gesture to GridRow that reads the value.

Note that the value contains read/unread status, forwarded/replied as well as the message class (i.e. meeting request)

Resolving patch:
diff --git a/source/appModules/outlook.py b/source/appModules/outlook.py
--- a/source/appModules/outlook.py
+++ b/source/appModules/outlook.py
@@ -5,11 +5,15 @@
 #See the file COPYING for more details.
 
 from comtypes import COMError
+from comtypes.hresult import S_OK
 import comtypes.client
+import comtypes.automation
+import ctypes
 from hwPortUtils import SYSTEMTIME
 import scriptHandler
 import winKernel
 import comHelper
+import NVDAHelper
 import winUser
 from logHandler import log
 import textInfos
@@ -30,6 +34,20 @@
 from NVDAObjects.behaviors import RowWithFakeNavigation, Dialog
 from NVDAObjects.UIA import UIA
 
+PR_LAST_VERB_EXECUTED=0x10810003
+VERB_REPLYTOSENDER=102
+VERB_REPLYTOALL=103
+VERB_FORWARD=104
+executedVerbLabels={
+	# Translators: the last action taken on an Outlook mail message
+	VERB_REPLYTOSENDER:_("replied"),
+	# Translators: the last action taken on an Outlook mail message
+	VERB_REPLYTOALL:_("REPLIED ALL"),
+	# Translators: the last action taken on an Outlook mail message
+	VERB_FORWARD:_("forwarded"),
+}
+
+
 #: The number of seconds in a day, used to make all day appointments and selections less verbose.
 #: Type: float
 SECONDS_PER_DAY = 86400.0
@@ -419,6 +437,23 @@ def _get_name(self):
 				unread=False
 			# Translators: when an email is unread
 			if unread: textList.append(_("unread"))
+			try:
+				mapiObject=selection.mapiObject
+			except COMError:
+				mapiObject=None
+			if mapiObject:
+				v=comtypes.automation.VARIANT()
+				res=NVDAHelper.localLib.nvdaInProcUtils_outlook_getMAPIProp(
+					self.appModule.helperLocalBindingHandle,
+					self.windowThreadID,
+					mapiObject,
+					PR_LAST_VERB_EXECUTED,
+					ctypes.byref(v)
+				)
+				if res==S_OK:
+					verbLabel=executedVerbLabels.get(v.value,None)
+					if verbLabel:
+						textList.append(verbLabel)
 			try:
 				attachmentCount=selection.attachments.count
 			except COMError:


Test patch: