none
How to perform custom action after outlook error RRS feed

  • Question

  • Outlook doesn't allow to add an attachment of more than 30 MB size and shows the message as

    "The attachment size exceeds the allowable limit"

    I have developed an add in and need to perform a custom action post above mentioned error message is shown. Please let me know if it is possible and if yes, how can I achieve it.

    Thanks

    Wednesday, February 4, 2015 8:11 PM

All replies

  • You cannot intercept that message, but you can read or temporarily set (until the next sync) the PR_MAX_SUBMIT_MESSAGE_SIZE property on the store.

    See the related StackOverflow discussion: http://stackoverflow.com/questions/15373577/bypass-ignore-exchange-server-maximum-send-size/15373731#15373731


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Wednesday, February 4, 2015 8:39 PM
  • I dont want to set the size property. My requirement is to perform a custom action say show another message box after the native message box with error is closed by user pressing the Ok button.
    Wednesday, February 4, 2015 8:48 PM
  • The Outlook object model doesn't provide anything for that.
    Wednesday, February 4, 2015 8:53 PM
  • I have seen it can be done in one of the products. May be not outlook object model but using some hack to outlook window.
    Wednesday, February 4, 2015 8:56 PM
  • Try using the BeforeAttachmentAdd event of the MailItem class. There is no other trivial way to get the job done.
    Wednesday, February 4, 2015 9:01 PM
  • That doesn't work. If the attachment exceeds the size, control directly goes to RemoveAttachment event and the error message appears post execution of RemoveAttachment event method.
    Wednesday, February 4, 2015 9:19 PM
  • The Outlook object model doesn't provide anything for that. There is no trivial way to implement the required functionality.
    Wednesday, February 4, 2015 10:00 PM
  • Well - I am not sure outlook object model or some other way but It is possible as I have seen other doing it.

    Need help on finding out how?

    Thursday, February 5, 2015 1:11 PM
  • Where did you see it?
    Thursday, February 5, 2015 1:34 PM
  • I cannot reveal the product name in the forum but it works as mentioned.
    Thursday, February 5, 2015 2:27 PM
  • There is no trivial way to get the job done.
    Thursday, February 5, 2015 2:58 PM
  • Hi,

    As Eugene said that outlook object model doesn’t provide anything to deal with that. I think you could custom ribbon, for example, add a new button to check the file size first and achieve add attachment feature.

    # Ribbon Overview

    https://msdn.microsoft.com/en-us/library/bb386097.aspx

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, February 6, 2015 9:00 AM
    Moderator
  • we already have that in place but need to include the feature I mentioned in this post. As mentioned, I have seen it happening so I know that it can be done. Which way - that is what something to figure out. :(
    Friday, February 6, 2015 1:51 PM
  • Hi,

    If you have your own button to add attachment files, you could check the file size or total file size before add the file to the attachments collection.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, February 9, 2015 9:49 AM
    Moderator
  • My custom button is working fine. I need to achieve it through native attach file button as well.
    Monday, February 9, 2015 10:27 AM
  • Hi,

    As Eugene said that outlook object model doesn’t provide anything to deal with that. So, the workaround is use custom button to attach files.

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, February 10, 2015 3:04 AM
    Moderator
  • Guys - Thank you for your prompt responses but we are talking the same thing repeatedly. As I mentioned earlier in this post that we already have a customer button and we also do need the functionality from native file button. Here are the steps what we are trying to achieve:

    1. Attach a big file more than 30 MB using native attach file button

    2. Outlook will show the error message dialog stating that "The attachment size exceeds the allowable limit".

    3. Once user click on ok in this dialog box or close it, perform a custom action.

    We are trying to achieve point #3 and not able to find a way out. I have seen it working as mentioned so there is a way out for sure. Now it is outlook object model way or some other hack.. that I am not sure and trying to figure that out.

    Thanks.


    Tuesday, February 10, 2015 2:23 PM
  • Anybody has any ideas/workarounds on it?
    Thursday, February 12, 2015 6:36 PM