none
VSTO development outlook plugin how to get the full storage path attachment send mail attachments added RRS feed

  • Question

  • Such as the title, but I have a filepath verified discoveries are empty, there is a member of the method will be invoked after GetTemporaryFilePath COM error, but also can not get in VSTO attach the member variable. Accessories are found himself in a temporary directory exists, the registry seems to have a place to record the address of this directory, but this is his findings do not know can not be used as a method to obtain
    Monday, March 16, 2015 1:14 AM

Answers

  • Hello,

    First of all, the forum is for Office Apps. That's why I'd recommend asking VSTO specific questions on the Visual Studio Tools for Office (VSTO)  forum instead. For Outlook dev questions see the Outlook for Developers  forum .

    > there is a member of the method will be invoked after GetTemporaryFilePath COM error, but also can not get in VSTO attach the member variable.

    What exception do you get in the code? Could you please be more specific?

    The GetTemporaryFilePath method is only valid for those attachments whose Type property is OlAttachmentType.olByValue. That means that the attachment is a copy and that the copy can be accessed even if the original file is removed. For other attachment types, the GetTemporaryFilePath method returns an error.

    GetTemporaryFilePath also returns an error when accessing an Attachment object in an Attachments collection or in the AttachmentSelection object. UseGetTemporaryFilePath only in attachment event callbacks listed below for various Microsoft Outlook items:

    • AttachmentAdd
    • AttachmentRead
    • AttachmentRemove
    • BeforeAttachmentAdd
    • BeforeAttachmentPreview
    • BeforeAttachmentRead
    • BeforeAttachmentSave
    • BeforeAttachmentWriteToTempFile

    Where do you use the GetTemporaryFilePath method of the Attachment class? What code do you use?

    • Marked as answer by tk1223108078 Wednesday, March 18, 2015 1:21 AM
    Monday, March 16, 2015 1:27 PM

All replies

  • Hello,

    First of all, the forum is for Office Apps. That's why I'd recommend asking VSTO specific questions on the Visual Studio Tools for Office (VSTO)  forum instead. For Outlook dev questions see the Outlook for Developers  forum .

    > there is a member of the method will be invoked after GetTemporaryFilePath COM error, but also can not get in VSTO attach the member variable.

    What exception do you get in the code? Could you please be more specific?

    The GetTemporaryFilePath method is only valid for those attachments whose Type property is OlAttachmentType.olByValue. That means that the attachment is a copy and that the copy can be accessed even if the original file is removed. For other attachment types, the GetTemporaryFilePath method returns an error.

    GetTemporaryFilePath also returns an error when accessing an Attachment object in an Attachments collection or in the AttachmentSelection object. UseGetTemporaryFilePath only in attachment event callbacks listed below for various Microsoft Outlook items:

    • AttachmentAdd
    • AttachmentRead
    • AttachmentRemove
    • BeforeAttachmentAdd
    • BeforeAttachmentPreview
    • BeforeAttachmentRead
    • BeforeAttachmentSave
    • BeforeAttachmentWriteToTempFile

    Where do you use the GetTemporaryFilePath method of the Attachment class? What code do you use?

    • Marked as answer by tk1223108078 Wednesday, March 18, 2015 1:21 AM
    Monday, March 16, 2015 1:27 PM
  • thank you 
    Wednesday, March 18, 2015 1:21 AM