Change default "Save Sent Item To" folder

Status
Not open for further replies.

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hello all and best wishes for a happy new year!

While searching for a solution to "problem" that we have, I came across your VB codes here.
We are interested in the first solution from the above topic:
If you always want to use a different folder, you can use a macro to set the Save message to folder.

Setup:
We are using Office 365 email accounts along with the desktop version of Outlook 2016 32bit (16.0.4591.1000) on Windows 10 machines.
We want to apply a solution similar to the link above to users who have three email accounts setup to their Outlook. One main email address e.g. user@companya.com and two shared email accounts e.g. user@companyb.com and user@companyc.com

What we want is, the sent emails from @companyb.com and @companyc.com to be saved in the "Sent Items" folder of @companya.com.

Can the VB code below modified to suit our needs?
Code:
Private Sub Application_ItemSend(ByVal Item As Object)
  Dim objNS As NameSpace
  Dim objFolder As MAPIFolder
  Set objNS = Application.GetNamespace("MAPI")
  Set objFolder = objNS.GetDefaultFolder(olFolderSentMail).Folders("Diane")
  Set Item.SaveSentMessageFolder = objFolder
  Set objFolder = Nothing
  Set objNS = Nothing
End Sub
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
It should work as it will apply to all sent messages. If you don't want his to go there too, use an if statement to only apply it to some mail.

This filters to a subfolder of the default account's sent folder:
Set objFolder = objNS.GetDefaultFolder(olFolderSentMail).Folders("Diane")
If you want all in his sent folder, use
Set objFolder = objNS.GetDefaultFolder(olFolderSentMail)
or to use a folder at the same level as inbox, sent etc, use
Set objFolder = objNS.GetDefaultFolder(olFolderSentMail).parent.Folders("Diane")

Are the mailboxes added as Accounts (listed in file, account settings) or added as shared mailboxes? (Either 'automapped' to the user's account and show up when he creates a profile or added as an Additional mailbox in Account Settings, Change Account, More options).

If its a shared mailbox, sent items should go into the his sent items automatically, or into both mailboxes if the admin changed a setting. If the reg key was set to control where they went, remove it.
Save Sent Items in Shared Mailbox Sent Items folder
 

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hello Diane and thank you for your response.

The mailboxes are added as separated accounts. Under account settings, you can see three different entries. One for each mailbox. The users want ALL their sent emails to be stored in the "main's email account" Sent Items folder.

So if we use this code you listed:
Set objFolder = objNS.GetDefaultFolder(olFolderSentMail)​
all sent emails would be placed in Sent Items folder of the main email address (@companya.com)?
For example, if an email is sent from user@companyb.com the sent email will be saved in the Sent Items folder of the @companya.com mailbox?

Hope I didn't confuse you! :)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
They should be put in that - but i haven't tested it to confirm.
 

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Hello again Diane.
I tried the code above but it gives me an error every time I'm sending an email.
it sends the email just fine, but it always gives an error (please see attached screenshot) and saves the sent emails to the default Sent Items folder of each mailbox.
 

Attachments

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
i am getting that error too - i haven't had a lot of time to figure out why though. (and thought maybe it was because i used one exchange and one pop and the pop account wouldn't have permission to the exchange mailbox).
 

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I will try some of the other options available in this thread and I will report back!
From your experience, is there any software/add-on that can do what we are looking for?
Thank you!
 

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
* I can't edit my previous post, so I'm writing a new one! *

I tried two of the other options from this topic and they work.
Use VBA to display a dialog: Works on all three accounts in Outlook. However, if you click cancel when the dialog appears the Outlook freezes and have to force close the software.
Using Rules to file Sent items (+VBA): Works fine on all accounts in Outlook. The only downside (not-really) is that the sent emails are now in two folders (when sending from a shared mailbox), one in the shared mailbox Sent Items and one in the folder we choose in the rule.

Using the second option will work for us! (changing the default folder would be the optimum solution!)

Do you have any software/add-on that might do this as well?

Thank you very much for your time!
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
However, if you click cancel when the dialog appears the Outlook freezes and have to force close the software.
Sounds like the macro isn't properly handling the cancel.

I'm not aware of any addins that can handle the sent messages.
 

Charalambos

New Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
We will use the other method then until we find something "better".
Thank you very much for your time and your help!
 
Status
Not open for further replies.
Thread starter Similar threads Forum Replies Date
V Change default default save location to Quick Access Using Outlook 1
E Change Default Directory when attach or save files of emails Using Outlook 1
Y Change default location to save VCard Using Outlook 1
E How to display "Change Folder" in Change Default Email Delivery Location in Exchange Outlook 2016 Using Outlook 1
S Outlook 2010 unable to change default font Using Outlook 7
H Change Default Email Account Using VBA Outlook VBA and Custom Forms 5
C Change default colors for conditional formatting Using Outlook 2
Diane Poremsky To Change the Default E-mail Program in Windows New Slipstick.com Articles 0
L Change default from english to danish ...... Using Outlook 5
Davzell Change default pop3 account with script, prf or registery ? Outlook VBA and Custom Forms 0
Diane Poremsky Change the All Day Event Default Free/Busy to "Busy" New Slipstick.com Articles 3
M Change default "automatically test account settings when Next is clicked" Using Outlook 1
David Rahrer Change default Junk E-Mail folder Using Outlook 6
C Change the default sent folder Outlook VBA and Custom Forms 1
JulieB Default data file won't change Using Outlook 6
ogodt Change Default contact form and import from Excel 2010 Using Outlook 1
A iCloud add-on for Outlook: Reminder for new appointment is set to 'None' by default. How to change? Using Outlook 6
B Change default email for address book Using Outlook 1
J Change Default View - Color and font Using Outlook 3
C Change default reminder time for contacts Using Outlook 2
S CHANGE DEFAULT VIEW FOR CONTACT (People) SEARCH - Outlook 2013 Using Outlook 3
M Change default Current View on People Using Outlook 1
T How to change default search engine in Outlook 2013? Using Outlook 3
J How to change my default calendar...? Using Outlook 1
H Outlook default landscape need to change to portrait Using Outlook 1
K Change the default Archive location via GPO in Outlook 2010 Using Outlook 3
F Change default value of date/time type from "None" to Blank Using Outlook 1
G Default Account Change Using Outlook 5
O Exchange + pst: Can I change the default Outlook calendar/tasks/account? Exchange Server Administration 2
S change default contact list in Outlook 2010 to "contacts" rather than "global" Exchange Server Administration 1
M How do I change the default map from Bing to Google in Outlook 2003? Using Outlook 23
K Change default "Display As" for contact email addresses Using Outlook 1
G how to change default calendar view to show this week and future weeks? Using Outlook 1
J How To Change Default View of Tabs in Outlook 2010 Using Outlook 4
C Change default reading font in Outlook from Times New Roman 12 point to Arial Using Outlook 2
S Office 2010 Change Default Views Using Outlook 5
M Change default program for opening email attachments. Using Outlook 1
M Change the default processing of the Inbox and it's subfolder. Exchange Server Administration 1
S Change default address list Using Outlook 1
B Problems with Default to text and need to change to HTML. Must change Font each time I handle mail or typing. Using Outlook 1
R How can I change my default browser Using Outlook 1
R Can you/how do you/change the default Calender folder; MobileMe syncing issue Using Outlook 6
J When I compose an email in Plain Text, the default alignment is set to the right. How do I change it Using Outlook 1
D change default folder-level permissions in exchange Exchange Server Administration 3
H Change Default Outlook Calendar Using Outlook 3
N I can't change from Outlook to Yahoo! Mail as my default. Yahoo! Mail does not show up in the Intern Using Outlook 1
K It won't let me change default data files, and it won't let me remove the current default data file Using Outlook 2
C How to change Outlook 2007 Default Reminder Time Using Outlook 3
M Cannot Change the branding logo in exchange 2010 SP1 owa default theme Exchange Server Administration 6
R How to change the Default path of \owa\calendar Exchange Server Administration 1
Similar threads


















































Top