Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-26-2016, 04:43 PM
RetiredCHE RetiredCHE is offline How to send an email to an open archive folder as an addressee Windows 8 How to send an email to an open archive folder as an addressee Office 2013
Novice
How to send an email to an open archive folder as an addressee
 
Join Date: Jun 2016
Location: Alabaster, AL
Posts: 25
RetiredCHE is on a distinguished road
Default 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!
Reply With Quote
  #2  
Old 06-26-2016, 10:26 PM
gmayor's Avatar
gmayor gmayor is offline How to send an email to an open archive folder as an addressee Windows 10 How to send an email to an open archive folder as an addressee Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #3  
Old 06-27-2016, 09:53 AM
RetiredCHE RetiredCHE is offline How to send an email to an open archive folder as an addressee Windows 8 How to send an email to an open archive folder as an addressee Office 2013
Novice
How to send an email to an open archive folder as an addressee
 
Join Date: Jun 2016
Location: Alabaster, AL
Posts: 25
RetiredCHE is on a distinguished road
Default 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
Reply With Quote
  #4  
Old 06-27-2016, 08:02 PM
gmayor's Avatar
gmayor gmayor is offline How to send an email to an open archive folder as an addressee Windows 10 How to send an email to an open archive folder as an addressee Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote
  #5  
Old 06-28-2016, 06:47 AM
RetiredCHE RetiredCHE is offline How to send an email to an open archive folder as an addressee Windows 8 How to send an email to an open archive folder as an addressee Office 2013
Novice
How to send an email to an open archive folder as an addressee
 
Join Date: Jun 2016
Location: Alabaster, AL
Posts: 25
RetiredCHE is on a distinguished road
Default

Thanks, GMayor! I appreciate your responses.

Alan Cannon
(RetiredCHE)
Reply With Quote
Reply

Tags
addressee, archive, send

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to send an email to an open archive folder as an addressee How to open Documents folder directly from CTRL+O of Open folder on QAT scvjudy Word 2 08-11-2014 10:58 PM
How to send an email to an open archive folder as an addressee 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
How to send an email to an open archive folder as an addressee 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:37 PM.


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