Is it possible to save draft in a folder other than the default draft folder?

Answered Is it possible to save draft in a folder other than the default draft folder?

  • Wednesday, November 24, 2010 12:34 AM
     
     

    Hi

    I am using vs2010 and outlook 2010, i want to save certain draft in a seperate folder rather then default folder.

    what i am doing right now is listening to ItemAdd event on the default draft folder and then move the draft to the folder i want, but after the move, the inspector window is closed.

    I noticed that there is a property on MailItem called "SaveSentMessageFolder", is there anything similar like "SaveDraftMessageFolder" which i just missed or not exposed by OOM which i can set from PropertyAccessor?

    Any idea how i can achieve this?

    thanks


    Zhongchen Zhou

All Replies

  • Wednesday, November 24, 2010 2:54 AM
    Moderator
     
     

    May I ask why you want to force saving Drafts in a different folder using code?  I can't see this being a good idea in any possible way.

    Otherwise, you can change the default folder where Drafts are saved (in Options) to either the Inbox, Outbox, or Sent Items.  Where that setting is stored I have no idea, but it's not available via the Outlook Object Model.

    --
    Enter to win an Visual Studio 2010 Ultimate with MSDN subscription! Deadline is Friday, November 26th: http://www.add-in-express.com/creating-addins-blog/2010/11/18/twitter-facebook-contest/


    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault: MVP (Outlook), MCTS (SharePoint)
    Vice-President, Developer Evangelism: Add-in Express
    Twitter: elegault; Blog: Eric Legault My Eggo
  • Wednesday, November 24, 2010 3:11 AM
     
     

    Hi Eric

    Thanks for your reply

    I am writing an add-in to intergrate our system into outlook. Our system has mail features based on our system database and doesnot implement any messaging protocol. (if user login our system, they can send system wide mail without a valid email address).

    i add a new .pst file in the user profile and that new folder make it looks like it is a store for a normal email account. i want any drafts related to our system be stored in a subfolder called "draft" under that .pst file, but their normal email drafts should still be saved in their default drafts folder.

    is there any way to achieve this from code?

    thanks


    Zhongchen Zhou
  • Thursday, November 25, 2010 5:43 PM
    Moderator
     
     

    Are you saying these e-mails are not meant to be delivered?  If so, I would create Post items in a specific folder instead.


    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault
    Vice-President, Developer Evangelism: Add-in Express
    MVP (Outlook), MCTS (SharePoint)
    Twitter: elegault
    Blog: http://www.add-in-express.com/creating-addins-blog/author/eric-legault
  • Friday, November 26, 2010 12:15 AM
     
     

    Hi Eric

    Yes, these e-mails are not meant to be delivered, i will cancel send event for these mails and then call web service to save it in our database.

    if i use Post item, i lost the track of recipients, these are still mails for our system and to end user.


    Zhongchen Zhou
  • Monday, November 29, 2010 10:26 PM
    Moderator
     
     Answered
    Why not keep track of recipients in a custom field?  I still say that creating an e-mail that is never delivered is going to be problematic.  You will always run into trouble with Outlook when you try to remove functionality.
    (P.S. Please don't forget to mark this post as an answer if it has helped you)
    Eric Legault
    Vice-President, Developer Evangelism: Add-in Express
    MVP (Outlook), MCTS (SharePoint)
    Twitter: elegault
    Blog: http://www.add-in-express.com/creating-addins-blog/author/eric-legault