#1
|
|||
|
|||
How to send an email to an open archive folder as an addressee
I maintain a number of open archive folders for different activities I participate in so that I can keep the size of my Inbox down. Until now I manually move messages to these folders after they have been sent and are saved in the Sent folder.
I would like to be able to include the name of an archive folder, or even a subfolder of an archive folder in the To: or CC: address list. I have not been able to figure out how to do that, if it even can be done. Can anyone help with this or am I doomed to forever have to do the filing manually as a separate task? Any help is greatly appreciated! |
#2
|
||||
|
||||
I am not sure what the relevance of the To or CC address lists have to do with being able to move a message to a folder in your archive file.
You can process any open Outlook file in VBA, or open the file if it is not currently open and then process it. Something like the following would do that. Change the path of the archive file to that of your archive and the name of the sub folder to the sub folder you want to move the message to. Select a message and run the ProcessSelectedMessage macro. You could create a loop to process multiple messages if you preferred. Code:
Option Explicit Sub ProcessSelectedMessage() Dim olMsg As MailItem On Error Resume Next Set olMsg = ActiveExplorer.Selection.Item(1) MoveToArchive olMsg lbl_Exit: Exit Sub End Sub Sub MoveToArchive(olItem As Object) Dim olStore As Store Dim olFolder As Folder Dim fso As Object Const strPath As String = "T:\Outlook Backup\Archive.pst" ' the path of the archive file Start: For Each olStore In Session.Stores If olStore.FilePath = strPath Then 'see if the archive is open Exit For End If Next olStore If olStore Is Nothing Then If MsgBox("The Archive folder " & strPath & " is not currently open." & vbCr & vbCr & _ "Do You wish to open it now?", vbYesNo) = vbYes Then Set fso = CreateObject("Scripting.FileSystemObject") If fso.FileExists(strPath) Then Session.AddStore strPath GoTo Start: Else MsgBox "The archive file " & strPath & " is no longer available." GoTo lbl_Exit End If Else GoTo lbl_Exit End If End If 'the archive folder is open, so process the msg Set olFolder = olStore.GetDefaultFolder(olFolderInbox).folders("MySubFolder") olItem.Move olFolder lbl_Exit: Set olStore = Nothing Set olFolder = Nothing Set olItem = Nothing Set fso = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
Reason for To/CC
The reason for the To or CC (or Bcc for that matter) is that I want to use the name of the archive folder in the address fields when composing/addressing the message. That way the filing of the message becomes integral to the sending of the message rather than a separate step.
For example, if I have an archive folder named Boy Scouts, and I'm sending a message to several individuals about a Boy Scout function, by including "Boy Scouts" in one of the address blocks a copy is automatically put there when I click Send. Quite a few years ago I was working in a client's office who used and set me up as a user of their ccMail system. This capability was inherent in ccMail back then. If it isn't available in Outlook then I suggest it for consideration in future updates of the program. Alan |
#4
|
||||
|
||||
The answer to your question is 'no'. You will need to use some other method to identify the messages that need to be archived, and when you have it, the macro I posted will do the job.
The contributors to this forum do not represent Microsoft, work for them nor speak for them. If you want to raise an issue with Microsoft you should so it through Microsoft channels. They are unlikely to see your comments here.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Thanks, GMayor! I appreciate your responses.
Alan Cannon (RetiredCHE) |
Tags |
addressee, archive, send |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to open Documents folder directly from CTRL+O of Open folder on QAT | scvjudy | Word | 2 | 08-11-2014 10:58 PM |
Command button - save in temp folder and send email with attachment | bigbird69 | Word VBA | 13 | 11-18-2012 10:06 PM |
Export Subfolder ~ Now ENTIRE Archive Folder is missing? HELP! | TwinCams | Outlook | 0 | 01-31-2011 11:24 AM |
Email Archive Recovering | Mohamad | Outlook | 2 | 10-25-2010 06:57 AM |
Single-click to archive emails to dif't folders based on original folder? | Dougmeister | Outlook | 0 | 09-23-2010 01:18 PM |