-
ThisOutlookSession Help
I just started working with VBA and barely started to understand how to read the codes. I'd appreciate any help on my situation below.
Below is a code in my 'ThisOutlookSession' and I am trying to tweak it around to work for a shared mailbox that 10 different people will be working on at the same time. If I setup a code in my outlook 2003 to target a folder in a shared mailbox, how do I target multiple folders (Processing & Completed) and depending on the folder the mail is moved to I want it to reply either a reply that it is being processed or reply that it is finisded?
Here is the code I was setup for but is only targets one folder and one reply:
[vba]Private Sub Application_Startup()
Dim ns As Outlook.NameSpace
Set ns = Application.GetNamespace("MAPI")
Set TargetFolderItems = ns.Folders.Item( _
"Mailbox - Acctg Shared").Folders.Item("Processing").Items
End Sub
Sub TargetFolderItems_ItemAdd(ByVal Item As Object)
Dim myReply As MailItem
Set myReply = Item.Reply
With myReply
.Subject = "Acctg Dept Generated Message"
.Body = "Some body text here"
.Send
End With
End Sub [/vba]
Also, do I have to setup this code on everyone outlook that will be working on this shared mailbox?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules