![]() |
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 |
#1
|
|||
|
|||
![]()
Hi,
I have been using Outlook Redemption for about a year now and it's been incredibly useful in the development of an add-in for Outlook 2K/XP/2003. I am trying to retrieve the e-mail (well actually, only the recipients, body and attachments) that is being composed by the user and export an RFC822 version of it. For months my code was actually extracting the various parts of the message I needed, reconstructing it using CDO (cdosys.dll), and getting the RFC822 stream that CDO would provide. It worked "fairly" well (considering the fact that I had to deal with different body formats, different attachment types, etc.). But then I found out there was a much easier way to do it: simply use the SaveAs() method of a SafeMailItem object. It litterally cut my code in half, it is much cleaner, faster, efficient! But I recently found a bug I had never encountered with that method. On two machines running Windows XP with Outlook 2000, calling the SaveAs() method freezes Outlook -- we have to kill it using the task manager. (The issue is not related specifically to either Windows XP nor Outlook 2000, because it worked fine on other computers running them.) It is also not an issue with filename or write permissions, because I can OpenForOutput/Print/Close the same file in plain VB. I know of a couple of ways to make Outlook or the add-in crash when trying to save a MailItem (like using Outlook's built-in encryption, and then trying to save it programmatically), but this one, I had never encountered. I am now clueless about what I should do to fix this issue. I don't want to have to go back to my old bulky code... What are the possible reasons for this SaveAs() method to fail or to have a similar behavior? (I hope Dmitry Streblechenko sees this!) Thanks!! |
Ads |
#2
|
|||
|
|||
![]()
What is your version of Redemption? When your code hangs, does CPU
utlization go to 100%? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ups.com... Hi, I have been using Outlook Redemption for about a year now and it's been incredibly useful in the development of an add-in for Outlook 2K/XP/2003. I am trying to retrieve the e-mail (well actually, only the recipients, body and attachments) that is being composed by the user and export an RFC822 version of it. For months my code was actually extracting the various parts of the message I needed, reconstructing it using CDO (cdosys.dll), and getting the RFC822 stream that CDO would provide. It worked "fairly" well (considering the fact that I had to deal with different body formats, different attachment types, etc.). But then I found out there was a much easier way to do it: simply use the SaveAs() method of a SafeMailItem object. It litterally cut my code in half, it is much cleaner, faster, efficient! But I recently found a bug I had never encountered with that method. On two machines running Windows XP with Outlook 2000, calling the SaveAs() method freezes Outlook -- we have to kill it using the task manager. (The issue is not related specifically to either Windows XP nor Outlook 2000, because it worked fine on other computers running them.) It is also not an issue with filename or write permissions, because I can OpenForOutput/Print/Close the same file in plain VB. I know of a couple of ways to make Outlook or the add-in crash when trying to save a MailItem (like using Outlook's built-in encryption, and then trying to save it programmatically), but this one, I had never encountered. I am now clueless about what I should do to fix this issue. I don't want to have to go back to my old bulky code... What are the possible reasons for this SaveAs() method to fail or to have a similar behavior? (I hope Dmitry Streblechenko sees this!) Thanks!! |
#3
|
|||
|
|||
![]() Hi (I'm so glad to hear from you!), We're using the latest version (4.1.0.507). (We upgraded when we found out there were some issues with the attachments when using that same SaveAs() with the earlier Redemption we were using.) I made perfectly sure that was the right version used by displaying it with MAPIUtils.Version. Unfortunately, I cannot access the computers on which it occurred right now, they are at some client's office! (By now, they've tested it on a third, apparently "clean" machine, and it failed exactly the same way.) What I know is that when I played with it yesterday, I could right-clic on the taskbar's button and choose "Close", which would immediately pop up the "Not responding" window, and then it would quit really quickly. So it doesn't appear as if the CPU was working real hard. - Charles |
#4
|
|||
|
|||
![]()
Does this happen with the same messages or with any message on these
machines? Redemption 4.1 uses IConverterSession (provided by Outlook) to perform the the MIME conversion - there is a bug there that causes an unusually slow processing of some messages. It eventually finishes, but it can take a while (hours?). IConverterSession is available in Outlook 2002 and up; in the previous versions of Outlook built-in MIME conversion code is used by Redemption. I am not aware of similar issues in Redemption - since you are using Outlook 2000, Redemption seems to be the culprit. Is there any chance you can try to install Outlook 2002 or 2003 and see if this still happens? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message ups.com... Hi (I'm so glad to hear from you!), We're using the latest version (4.1.0.507). (We upgraded when we found out there were some issues with the attachments when using that same SaveAs() with the earlier Redemption we were using.) I made perfectly sure that was the right version used by displaying it with MAPIUtils.Version. Unfortunately, I cannot access the computers on which it occurred right now, they are at some client's office! (By now, they've tested it on a third, apparently "clean" machine, and it failed exactly the same way.) What I know is that when I played with it yesterday, I could right-clic on the taskbar's button and choose "Close", which would immediately pop up the "Not responding" window, and then it would quit really quickly. So it doesn't appear as if the CPU was working real hard. - Charles |
#5
|
|||
|
|||
![]() It happens with every message/any message. I will see if they can try what you've o-suggested (install Outlook 10 or 11 and try again) and write you back. For the moment, I've patched back my old "extraction" code and it should work -- but of course I prefer the SaveAs() method. I am using Outlook 2003 during development. Comparing the two outputs (one using SafeMailItem.SaveAs() and the other using IMessage.GetStream().SaveToFile()), I've noticed that using the SaveAs() method strips accented characters from recipient names, whereas my alternate solution (using CDO) automatically encodes the names in quoted-printable (which is a good thing). By the way Redemption is an essential tool in Outlook programming -- if I can be of any help identifying how to reproduce these issues, I'd be glad. I'd probably have a couple of questions for other problems I've encountered in the last year, for which I've found some workaround solutions (which were not always pretty). - Charles |
#6
|
|||
|
|||
![]()
Let me know what you find out.
BTW, what version of Redemption are you using? Dmitry Streblechenko (MVP) http://www.dimastr.com/ OutlookSpy - Outlook, CDO and MAPI Developer Tool wrote in message oups.com... It happens with every message/any message. I will see if they can try what you've o-suggested (install Outlook 10 or 11 and try again) and write you back. For the moment, I've patched back my old "extraction" code and it should work -- but of course I prefer the SaveAs() method. I am using Outlook 2003 during development. Comparing the two outputs (one using SafeMailItem.SaveAs() and the other using IMessage.GetStream().SaveToFile()), I've noticed that using the SaveAs() method strips accented characters from recipient names, whereas my alternate solution (using CDO) automatically encodes the names in quoted-printable (which is a good thing). By the way Redemption is an essential tool in Outlook programming -- if I can be of any help identifying how to reproduce these issues, I'd be glad. I'd probably have a couple of questions for other problems I've encountered in the last year, for which I've found some workaround solutions (which were not always pretty). - Charles |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook calendar stops responding/freezes | Jubee | Outlook - Calandaring | 0 | April 10th 06 03:17 PM |
Saveas dialog | Dimitri | Outlook and VBA | 5 | February 20th 06 06:51 PM |
Outlook Express 6 freezes when I begin to type a new message. | PC User | Outlook Express | 1 | January 14th 06 05:25 PM |
Monthly calendar view freezes Outlook! | Der_Techniker | Outlook - Calandaring | 1 | January 12th 06 05:48 PM |
my outlook express freezes | Vern | Outlook - Installation | 3 | January 10th 06 09:55 PM |