![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#6
|
|||
|
|||
![]()
Hi,
I've tried setting the MAPIOBJECT, but it doesn't work. but Application outLookApp = new Application(); Redemption.RDOSession session = (Redemption.RDOSession)outLookApp.CreateObject("Re demption.RDOSession"); session.MAPIOBJECT = outLookApp.Session.MAPIOBJECT; RDOAddressEntry entry = session.GetAddressEntryFromID(addressEntry.ID,null ); String smtp = entry.SMTPAddress; works in all cases. I still don't figure out why using the other code... @Dimitry: Thanks for your great Utilities. My company just purchased a license! Well done. cheers, jan Dmitry Streblechenko schrieb: Note that the scheduler runs as a service, and no Office app should be used in a service. Most likely Redemption cannot automatically pick up the MAPI session used by Outlook, you can help it by calling something like the following first : set Utils = CreateObject("Redemption.MAPIUtils") Utils.MAPIOBJECT = YourOutlookApp.Session.MAPIOBJECT 'your old Redemption code goes here. Thiswill ensure that Redemption caches teh MAPI session used by Outlook. Or use the RDO family of objects... Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool "jpfi" wrote in message ups.com... Hi, I've written an console-application based on Redemption (http://www.dimastr.com/redemption/)). the following code tries to resolve the smtp-Address of the mailsender: if(addressEntry.Type.Equals("EX")){ //39FE = PR_SMTP_ADDRESS 001E for type PT_String8 String temp = (String)addressEntry.get_Fields(0x39FE001E); if(temp == null){ //403E = PR_OrgEmailAddr 001E for type PT_String8 temp = (String)addressEntry.get_Fields(0x403E001E); if(temp==null){ throw new Exceptions.MailAddressCouldNotExtractedException(a ddressEntry.Address); } } return temp; } In case of starting the application in normal way the shown code works. addressEntry.get_Fields(0x39FE001E) return the correct value. When handling the same mail by starting the app per sceduled task (same user performer) addressEntry.get_Fields(0x39FE001E) return null ! any idea? Thank you, Jan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
inconsistent in Redemption | Vadivel | Outlook and VBA | 10 | April 25th 06 06:12 PM |
show all recurrences of a task in the task list | dash | Outlook - Calandaring | 2 | April 15th 06 02:45 AM |
How do I drag a task in task list of Outlook. It will not let me. | rpetralia | Outlook - Calandaring | 2 | April 5th 06 10:14 AM |
Redemption | Christoph | Add-ins for Outlook | 5 | March 6th 06 03:26 PM |
Redemption MAPITable | Dmitry Streblechenko | Add-ins for Outlook | 1 | January 12th 06 04:09 AM |