title: Outlook Web Add In -
body: <p>I have a COM Outlook Add-In that I am converting to Outlook Web Add-in. I want to disable the ICON if the selected email does not have an attachment; if multiple attachments, provide the user an option to select one attachment. I have this working in the COM project, but it's Windows based, so I can open Windows Form with the attachment to be selected. I am new to Outlook Web 
  Add-In and not sure how to do this with the HTML/JS/XML. I am using Visual Studio 2019 - language c#</p>
  
  <p>I have create a Visual Studio Outlook Web Add-in Project - I have the html, js and xml files - not sure how to disable the add-in icon if the selected email does not have an attachment - </p>
  
  <p>I am having problem with the code format - here is an example with current cdoe calling .cs method.</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;button id="PushToSFDCExplorer" size="large" label="Push To Salesforce" 
          getEnabled="isEnabledOnExplorer" getImage="GetButtonImage" 
          onAction="PushToSalesforce_Click" /&gt;
  </code></pre>
  
  <p>I would like to know the best way to handle enabling the add-in icon if selected email has an attachment - if multiple attachment, allow the user to select one attachment - not sure how to do this in Outlook Web Add-in since it appears to be xml/js driven.</p>