App for Outlook: Possible to add an attachment RRS feed

  • Question

  • Hello

    I have tried calling CreateAttachment EWS method via makeEwsRequestAsync function. The response was expected: not allowed to call this function.

    Is there a way to add attachments via UpdateItem method? Or some other workaround to update an item and adding attachment to it.

    Thank you

    Anze Javornik

    Sunday, January 20, 2013 4:53 PM


All replies

  • Hi Anze Javornik,

    Thank you for posting in the MSDN Forum.

    I'll consult your issue with my colleague. You'll be informed if there's any update.

    Thank you for your patience.

    Best regards,

    Quist Zhang [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Edited by Quist Zhang Monday, January 21, 2013 10:22 AM
    Monday, January 21, 2013 10:21 AM
  • Hi Anze.  Here's hoping I can be of assistance after your efforts helping me! :-)

    CreateAttachment isn't listed as one of the supported operations for makeEwsRequestAsync (as listed in the link below).  Unless you've found a different approach??

    Using the permission model for mail apps in Outlook:

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    • Marked as answer by Anze Javornik Monday, April 22, 2013 10:44 PM
    Monday, January 21, 2013 4:04 PM
  • Yeah i hoped that if it is not listed didnt really mean its not possible...it might have been forgoten :)  So i tried anyway and it was not allowed.

    There might be some other way maybe...maybe there might be some workaround with CreateItem, or something if you are trying to attach only exchange objects.

    Anze Javornik

    Monday, January 21, 2013 4:16 PM
  • It'll certainly be nice if they are working behind the scenes to add more Mail App or supported EWS methods.  So much is locked down that it's a challenge to build interesting solutions.  In the interim we have to be creative and look for loopholes!

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Monday, January 21, 2013 4:23 PM
  • I found one workaround for a different problem ( http://social.msdn.microsoft.com/Forums/en-US/appsforoffice/thread/b8c023c1-99a4-4dd1-bb26-ea745ae5becd ). But none for this yet.

    Anze Javornik

    Monday, January 21, 2013 4:28 PM
  • I'm going to sound like a parrot here, but what's the scenario for adding an attachment to an existing message? :)

    I ask this question all the time, in order to make sure that providing you access to what you are asking for will actually enable you to build the scenario. There may be other things at play that we have to think about, so we want to make sure we understand the requirement completely.


    Friday, February 1, 2013 7:59 PM
  • My two cents is that adding attachments to existing messages are rare, but removing them is not (archiving solutions for one).

    Eric Legault MVP (Outlook)
    About me...
    Outlook Appins: Store Social Media fields in your Outlook Contacts!

    Friday, February 1, 2013 8:03 PM
  • If for example you make an appointment (task, ...) from app which activates on email (EWS CreateItem or even UpdateItem method). I would like to add this email as attachment to the newly created item. Mainly this is just about adding existing exchange objects to an item. If activation for composed items will be made possible and refresh of content then apps will be able to not only provide automatical building of body text but also add further feateures with exchange (or others) objects as attachments.

    Anze Javornik

    Friday, February 1, 2013 10:10 PM
  • Another example for this is, if you create a Task for specific user, that you can send it to him as attachment. Any option this can be done with already implemented api or do i need to wait for CreateAttachment method to be available in api?

    Anze Javornik

    Friday, March 29, 2013 11:48 AM
  • Another example is that one of our Add-in solutions generates an xml file attachment from user property values and other message information that is then consumed by an ERP integration service from the mailbox it is sent to, which would otherwise not be able to access the data from the user properties.

    Is there a reason behind imposing limitations on what is possible for Mail Apps to do just because someone at Microsoft hasn't thought of an innovative use for it? That seems like a pretty fundamental shift from the way Office has previously been extendable. Through COM and VSTO the Office applications have been extended in many ways Microsoft never thought of, which has been hugely useful to enterprises. The imposition of such strict limits on what the new Office Apps model can and can't do is not making it a realistic or appealing platform to focus on developing innovative solutions for.

    • Edited by Carson Green Friday, March 29, 2013 3:14 PM missing word in sentance
    Friday, March 29, 2013 1:56 PM
  • Hi Anze,

    Unfortunately there is no way as of now to create an attachment. The EWS operations currently allowed are documented in the article below:

    Using the permission model for mail apps in Outlook

    Hopefully we might have a way in the future.


    Shailesh G. Rajput
    Microsoft Developer Support - Messaging & Collaboration
    • Marked as answer by Anze Javornik Monday, April 22, 2013 10:34 PM
    Monday, April 22, 2013 10:05 PM
  • I hope so too...this with:

    • activation for composed items
    • refersh of body, attendees, ... content via either Resync after ews call or via JS API

    would make this framework a lot more usable and would defenitly produce more apps.

    Anze Javornik

    Monday, April 22, 2013 10:34 PM