title: How to access a large attachment BeforeAttachmentWriteToTempFile In Outlook AddIn
body: <p>I'm trying to intercept an attachment being added to a message in an Outlook plugin. Outlook/Exchange settings blocking large attachments, and I have found that when using the Attach button or dragging and dropping files to attach the &quot;BeforeAttachmentWriteToTempFile&quot; event fires BEFORE the message is displayed. This is great, it allows you to Cancel attach process before the message is display.</p>
  <p>However the problem is the Attachment Object passed to this Event throws COM exceptions when trying to get the FilePath or GetTemporaryFilePath. It also has a null DisplayName and 0 Size. I'd like to be able to access the filePath of the item that was attempted to attached</p>
  <p><a href="https://i.stack.imgur.com/roNoi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/roNoi.png" alt="Error I'm getting" /></a></p>