Redemption::RDOMail.PrintOut() / DoAction(maPrint) not working

  • Thread starter Thread starter wlan
  • Start date Start date
W

wlan

Hi,

I want to print an e-mail from inspector window. When I do the same using
the below code. it invokes Save As dialog.

OUTLOOKLib.NameSpace nms = m_oApp.GetNamespace("MAPI");
Redemption.RDOSession rdoSession = new
Redemption.RDOSession();
rdoSession.MAPIOBJECT = nms.MAPIOBJECT;

//entryID & storeID is non-empty
if (entryID != "" && storeID != "")
{
//get RDOMail object and initiate print action
Redemption.RDOMail rdoMail =
rdoSession.GetMessageFromID(entryID, storeID, false);
rdoMail.MessageClass = mi.MessageClass;


rdoMail.DoAction(Redemption.rdoMessageAction.maPrint,
User32.GetForegroundWindow());
}

What would be the issue?
 
You already have the message as Outlook.MailItem, calling MailItem.PrintOut
woudl be much better.
Redemption uses MAPI forms to print message, and that area of MAPI has not
received its due attention to put mildly. MailItem.PrintOut on the other
hand uses internal Outlook code to print.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 
Back
Top