Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-14-2012, 09:10 AM
sunnyshiny06 sunnyshiny06 is offline vba outlook change SaveSentMessageFolder Windows 7 64bit vba outlook change SaveSentMessageFolder Office 2010 64bit
Novice
vba outlook change SaveSentMessageFolder
 
Join Date: Mar 2012
Posts: 1
sunnyshiny06 is on a distinguished road
Default vba outlook change SaveSentMessageFolder


Hello,

Ive two accounts, so users can change their account in a new mail on the from button.
I would like in vba change the "sent item" folder by default always use the same. Weather an user use "account A" or "account B" that mail sent go always on the "sent mail" folder of "account A".

My code is like that :
Dim MyMail As MailItem, _
olkInspector As Outlook.Inspector, _
olkSendThroughBtn As CommandBarPopup, _
olkSendAccount As CommandBarButton, _
mpf As Outlook.Folder, _
mpfInbox As Outlook.Folder

Set MyMail = Application.CreateItem(olMailItem)
MyMail.BodyFormat = olFormatPlain
MyMail.Body = ""
MyMail.Display
Set mpfInbox = Application.Session.GetDefaultFolder(olFolderSentM ail)
Set mpf = mpfInbox.Folders.Item("Sent Itemps")

Set MyMail.SaveSentMessageFolder = mpfInbox

The thing is if they change the from to "Account B" the sent item is changed on sent Items from the "Account B" not from the "Account A".

Any idea?
Maybe i need to update insated the code in Private Sub Application_ItemSend ???
Thanks
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
vba outlook change SaveSentMessageFolder change the view to final, my change bars disappear. I need them visible anna.a.julin Word 1 03-01-2012 08:05 PM
vba outlook change SaveSentMessageFolder Possible to change outlook POP settings if I can't get into Outlook on my computer? firegirl1177 Outlook 1 12-30-2011 07:18 PM
Help! How to change Outlook default language? Ventilaator Outlook 0 11-01-2011 04:52 AM
vba outlook change SaveSentMessageFolder how to change default browser for Outlook hyperlinks soureel Outlook 1 02-03-2011 07:31 AM
Is there a way to change Outlook template on the fly? Skyphoxx Outlook 0 01-06-2009 09:36 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft