none
outlook plug-in, how to get some certain attachments' real source path? RRS feed

  • Question

  • We are developpin an outlook plug-in. Now we want to get the certain attachments' real source path.

    The certain attachments are contained in .msg file and the .msg file is the mail attachment too.

    How to get the certain attachments's real source path?

    Thank in advance!

    Thursday, June 1, 2017 12:09 PM

All replies

  • What is "real source path"? File name and the fully qualified path?

    Outlook simply does not store that information, and an attachment does not have to come from the file system at any point.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Thursday, June 1, 2017 6:31 PM
  • Hello,

    For the path of attachments, what we could get:

    1) the real source path when we insert an attachment

    To get this, we could handle AttachmentAdd or BeforeAttachmentAdd event.

    2) the path of an temporary file for attachment preview  

    My outlook temporary folder is in

    %UserProfile%\AppData\Local\Microsoft\Windows\INetCache\Content.Outlook\

    You could get the path from Registry key OutlookSecureTempFolder under HKEY_CURRENT_USER\Software\Microsoft\Office\X.0\Outlook\Security

    So i dont think we could get the real source path of an attachment in a .msg file attachment.

    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.

    Friday, June 2, 2017 7:14 AM
    Moderator