none
Email Attachments RRS feed

  • Question

  • Hello All,

    Can we enable the below feature Through Exchange 2013 or Outlook 2013 or From Custom Outlook Add-in

    1. When a user attach a file, Outlook should prompt with a dialogue box “verbiage can be decided later ” with ok to continue.


    2. User should not be able to bye-pass this dialogue box.

    Can we enable this type of option through Outlook settings or Exchange Admin center ?

    Please Advise ASAP.

    Thanks,

    Mani L



    Mani L

    • Moved by Steve Fan Monday, May 1, 2017 8:38 AM
    Friday, April 28, 2017 7:12 AM

Answers

  • Hello Mani,

    We could create an VSTO add-in and handle MailItem.BeforeAttachmentAdd Event (Outlook) to add a message box. Then users would get a message box when attaching files.

    To create an VSTO add-in for Outlook, please visit Walkthrough: Creating Your First VSTO Add-In for Outlook

    Then you could use the following code:

       private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
    
                Application.Inspectors.NewInspector += Inspectors_NewInspector;
    
            }
    
    
            private void Inspectors_NewInspector(Outlook.Inspector Inspector)
            {
                Object item = Inspector.CurrentItem;
                if (item is Outlook.MailItem)
                {
                    Outlook.MailItem mailItem = item as Outlook.MailItem;
                    mailItem.BeforeAttachmentAdd += MailItem_BeforeAttachmentAdd;
                }
            }
    
            private void MailItem_BeforeAttachmentAdd(Outlook.Attachment Attachment, ref bool Cancel)
            {
                MessageBox.Show("verbiage can be decided later ");
            }
    
    
    

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 1, 2017 8:43 AM
    Moderator

All replies

  • Hi Mani,

    This is not possible via Outlook build-in features, however, it could be possible via VSTO add-in. Since this forum focuses more on general questions related to Microsoft Outlook, I'll move your question to a more appropriate forum for more dedicated assistance:

    https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=outlookdev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    Regards,

    Steve Fan


    Please remember to mark the replies as answers if they helped.

    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, May 1, 2017 8:38 AM
  • Hello Mani,

    We could create an VSTO add-in and handle MailItem.BeforeAttachmentAdd Event (Outlook) to add a message box. Then users would get a message box when attaching files.

    To create an VSTO add-in for Outlook, please visit Walkthrough: Creating Your First VSTO Add-In for Outlook

    Then you could use the following code:

       private void ThisAddIn_Startup(object sender, System.EventArgs e)
            {
    
                Application.Inspectors.NewInspector += Inspectors_NewInspector;
    
            }
    
    
            private void Inspectors_NewInspector(Outlook.Inspector Inspector)
            {
                Object item = Inspector.CurrentItem;
                if (item is Outlook.MailItem)
                {
                    Outlook.MailItem mailItem = item as Outlook.MailItem;
                    mailItem.BeforeAttachmentAdd += MailItem_BeforeAttachmentAdd;
                }
            }
    
            private void MailItem_BeforeAttachmentAdd(Outlook.Attachment Attachment, ref bool Cancel)
            {
                MessageBox.Show("verbiage can be decided later ");
            }
    
    
    

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 1, 2017 8:43 AM
    Moderator
  • Thanks for your reply Celeste.

    I will try the same and update you the status.

    Thanks,

    Mani L


    Mani L

    Tuesday, May 2, 2017 7:22 AM
  • Hello,
    Does the code above work for you?
    If you have any issues, please let me know.
    Regards,
    Celeste

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, May 4, 2017 6:46 AM
    Moderator
  • Hi Celeste,

    I builded the VSTO outlook addin and the functionality is working in the dev machine.

    But when I try the same in end user machine its not pop up when attach the files.

    I installed the addin with out error but its not pop up when attach any files.

    could you please help on this issue?

    Thanks,

    Mani L


    Friday, May 5, 2017 10:23 AM
  • Hi ,

    Any update?

    I published the VSTO as a setup file and installed in one of the end user system. but its not pop up when attach any files in outlook new mail compose.   I can see the new add in in outlook COM add ins list.

    any fix for this issue?

    Thanks,

    Mani L


    Mani L


    Saturday, May 6, 2017 7:51 AM
  • Hello,

    Please see the following links to troubleshoot the issue.

    My Office Addin does not Load!

    Troubleshooting COM Add-In load failures

    Since this is a new issue about deployment, I suggest you create a new thread, so that we could focus on the specify issue and other community member could see your problem and offer their suggestion. Thanks for your understanding.

    Regards,

    Celeste


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 8, 2017 1:41 AM
    Moderator
  • I fixed this issue. now addin works fine in Outlook.

    Thanks for your help.


    Mani L

    Tuesday, May 9, 2017 6:16 AM