![]() |
Redemption Workaround to Get SentOn from .msg files = unexpectedresults
The code below incorporates a workaround to to what the title of this
post says. The workaround is suggested in, "http://www.dimastr.com/ redemption/faq.htm#15". rMessage is always nothing after 'reopen the same message as Redemption.MessageItem is exectuted even though it seems to have a strEntryID. Is this more likely a problem with the Utils object or the saved message? Thanks Dim strEntryID As String, Utils, rMessage, mySentOn As Date Set Utils = CreateObject("Redemption.MAPIUtils") .... sItem.Import fullpath, 3 'olMSG, olRFC822 and olTNEF formats are supported ' the following code added to get correct SentOn date ' http://www.dimastr.com/redemption/faq.htm#15 'MsgBox (sItem.Subject & ", " & sItem.entryID) sItem.Save 'Save the OOM object just to make sure EntryID is available strEntryID = sItem.entryID 'remember the entry id mySentOn = #11/11/2007# Set rMessage = Utils.GetItemFromID(strEntryID) 'reopen the same message as Redemption.MessageItem If Not rMessage Is Nothing Then MsgBox (rMessage.Subject & " --- found") 'rMessage.Import fullpath, 1024 rMessage.Import fullpath, 3 rMessage.Save mySentOn = rMessage.SentOn Else ' always takes this path MsgBox (sItem.Subject & " --- missing") End If ' end of kludge |
Redemption Workaround to Get SentOn from .msg files = unexpected results
When using the MAPIUtils object from Redemption you should be setting the
MAPIUtils.MAPIOBJECT property to the NameSpace.MAPIOBJECT (for Outlook 2002 and later) before attempting to use MAPIUtils so Redemption and Outlook are using the same MAPI session. The same goes for any Safe*Item, RDOSession, etc. objects. All should have their MAPIOBJECT properties set where required before you work with the objects. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm wrote in message ... The code below incorporates a workaround to to what the title of this post says. The workaround is suggested in, "http://www.dimastr.com/ redemption/faq.htm#15". rMessage is always nothing after 'reopen the same message as Redemption.MessageItem is exectuted even though it seems to have a strEntryID. Is this more likely a problem with the Utils object or the saved message? Thanks Dim strEntryID As String, Utils, rMessage, mySentOn As Date Set Utils = CreateObject("Redemption.MAPIUtils") ... sItem.Import fullpath, 3 'olMSG, olRFC822 and olTNEF formats are supported ' the following code added to get correct SentOn date ' http://www.dimastr.com/redemption/faq.htm#15 'MsgBox (sItem.Subject & ", " & sItem.entryID) sItem.Save 'Save the OOM object just to make sure EntryID is available strEntryID = sItem.entryID 'remember the entry id mySentOn = #11/11/2007# Set rMessage = Utils.GetItemFromID(strEntryID) 'reopen the same message as Redemption.MessageItem If Not rMessage Is Nothing Then MsgBox (rMessage.Subject & " --- found") 'rMessage.Import fullpath, 1024 rMessage.Import fullpath, 3 rMessage.Save mySentOn = rMessage.SentOn Else ' always takes this path MsgBox (sItem.Subject & " --- missing") End If ' end of kludge |
Redemption Workaround to Get SentOn from .msg files = unexpectedresults
Thanks Ken. That did it. May I be permitted to say, "You're the man" :
|
All times are GMT +1. The time now is 02:27 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com