Unable to handle FilePrintQuick from Outlook read receipt

Add-in Express™ Support Service
That's what is more important than anything else

Unable to handle FilePrintQuick from Outlook read receipt
 
Roger Middlebrook


Guest


In almost all Outlook inspectors, our code is meant to handle QuickPrint on the QAT. This includes read receipts.

Our event handler rbcFilePrintQuickAction is called for a received email but not for a received "read receipt".

I have tried setting the Ribbons property to include all available Outlook ribbons but our event handler is still not called.

Can you advise on what I am doing wrong and how to fix it?

Outlook 2013
Windows 8.1 x64
ADX VCL 8.0.1431 Premium
Posted 13 Jun, 2016 06:48:52 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Hello Roger,

When I open a read receipt (or delivery receipt) for the first time, Outlook calls the OnRibbonBeforeCreate event passing it 'Microsoft.Outlook.Report' in the RibbonId parameter. Try to use msrOutlookReport. Does it work?


Andrei Smolin
Add-in Express Team Leader
Posted 13 Jun, 2016 07:41:12 Top
Roger Middlebrook


Guest


That's what I thought too.

I have noticed, however, that my test is using a delivery receipt, not a read receipt. Sorry about that. It may make a difference but I haven't yet assessed this because my test server is set so it will not provide read receipts.

Here is the relevant part of my KapprisOffice_IMPL.dfm

object rbcFilePrintQuick: TadxRibbonCommand
    Id = 'adxRibbonCommand2FD2E9910C0745FC81675E09E4511698'
    IdMso = 'FilePrintQuick'
    OnAction = rbcFilePrintQuickAction
    Left = 56
    Top = 288
    Ribbons = [msrWordDocument, msrOutlookMailRead, msrOutlookMailCompose, msrOutlookMeetingRequestRead, msrOutlookMeetingRequestSend, msrOutlookAppointment, msrOutlookContact, msrOutlookJournal, msrOutlookTask, msrOutlookDistributionList, msrOutlookReport, msrOutlookResend, msrOutlookResponseRead, msrOutlookResponseCompose, msrOutlookResponseCounterPropose, msrOutlookRSS, msrOutlookPostRead, msrOutlookPostCompose, msrOutlookSharingRead, msrOutlookSharingCompose, msrOutlookExplorer]
    Ribbons2010 = [msrOutlookExplorer2010]
  end


I have checked the code to see if I have any routines that remove msrOutlookReport at runtime, but there are none.

As a double-check, I have also created a new project that uses only a single TadxRibbonCommand for FilePrintQuick and the event handler simply displays a message. Its Ribbons property includes ALL values beginning with msrOutlook.

With this new project QuickPrint works for a standard email but not for a delivery receipt.
Posted 15 Jun, 2016 05:04:27 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Roger,

To fix the issue, in CheckMsoControls replace

if (Pos('ipm.report', LowerCase(MsgClass)) = 1) then


with

if (Pos('ipm.report', LowerCase(MsgClass)) = 1) or (Pos('report.ipm', LowerCase(MsgClass)) = 1) then



Andrei Smolin
Add-in Express Team Leader
Posted 15 Jun, 2016 09:21:18 Top
Roger Middlebrook


Guest


Thanks Andrei. I am not used to changing your code.

If I alter your code on my workstation then it also needs to be altered on my colleague's machine and our build server and any upgrade will change it.

If I put adxAddIn into my own project, I then also need to bring in adxDefs.inc, possibly more files.

Can you advise on the best way to do this so it will still work if we upgrade ADX?
Posted 16 Jun, 2016 05:42:02 Top
Andrei Smolin


Add-in Express team


Posts: 18825
Joined: 2006-05-11
Roger,

In a moment, I'll send you an email with a download link to the build we created for you.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Jun, 2016 08:25:19 Top