none
How to Change Outlook Default Folder for Insert-Attachment and Save Email/Attachemnt while Outlook is open (VBA) RRS feed

  • Question

  • Hello,

    Office 2010 32bit, VBA

    Is it possible to programmatically do the above while Outlook is running?  If so, I'm hoping to make that change from a Word macro.

    I tried tinkering with the reg key and that doesn't work because it appears Outlook only respects it at startup time. Similary changing Word File-options-location of documents is respected only when Outlook starts.

    I'm looking to seamlessly keep Outlook's default folder in sync with Word's default folder as the users change working folders in Word, which they do many times per day (and they chose the folder among a couple of thousand possibilities).

    I'm hoping there is a difficult-to-find Outlook object I can manipuate to get to the end result.  IF there is such an Object I have been unable to find it.

    Many thanks!

    Julie

    Monday, March 2, 2015 1:28 AM

Answers

  • Hi Julie,

    Based on my research, I think outlook object model doesn’t provide the way to change the default folder for insert attachment and save email/attachment.

    The way to change it is that we need to modify the registry setting and the outlook app should be restart.

    # How to set the default attachment folder in Outlook

    https://support.microsoft.com/kb/252732?wa=wsignin1.0

    You may create the add-in to custom these actions (e.g. attach attachment, save email)

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by JW2030 Thursday, March 5, 2015 10:12 PM
    Tuesday, March 3, 2015 8:26 AM
    Moderator

All replies

  • Hello Julie,

    You can develop a VBA macro or an Outlook add-in where you can handle Outlook events such as ItemAdd and etc. See Getting Started with VBA in Outlook 2010 for more information.

    If you choose to develop an add-in, see Walkthrough: Creating Your First Application-Level Add-in for Outlook .

    Monday, March 2, 2015 5:56 AM
  • Hi Julie,

    Based on my research, I think outlook object model doesn’t provide the way to change the default folder for insert attachment and save email/attachment.

    The way to change it is that we need to modify the registry setting and the outlook app should be restart.

    # How to set the default attachment folder in Outlook

    https://support.microsoft.com/kb/252732?wa=wsignin1.0

    You may create the add-in to custom these actions (e.g. attach attachment, save email)

    Regards

    Starain


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    • Marked as answer by JW2030 Thursday, March 5, 2015 10:12 PM
    Tuesday, March 3, 2015 8:26 AM
    Moderator
  • thank you Starain,

    It was not the answer I was hoping for but is the answer I expected (object model doesn't provide a way) so its nice to have that confirmed so I can stop wasting time attempting to fit a square plug into a round hole.

    I tinkered with the reg keys manually but find Outlook reads it only at Outlook startup time so that isn't an option.  So in the absence of ability to change the path via the object model, I'm toast, and "happily" programming 4 macros that I could complete avoid if that path could be changed the way I wish:  save emails, open saved emails, save attachments, and attach files.  Its a crazy amount of work to replace the option to change one itty bitty path.  Many thanks.

    Julie

    Thursday, March 5, 2015 10:16 PM
  • Julie,

    Outlook doesn't read the windows registry entries every seconds. So, it is expected to read values when the application starts.

    All your requirements can be implemented in the code as I stated above. The following statement is completely wrong:

    > object model doesn't provide a way

    It does actually. Handle Outlook events and manages attachments in the code.

    Friday, March 6, 2015 8:59 AM