![]() |
|
|
|
#1
|
||||
|
||||
|
The GetNamespace line is required!
If your distribution list names are the same as the folder names then change the folder related code as follows, but while testing ensure that Outlook is not configured to send immediately of you will send the test message to the contact group: Code:
Private Sub Newsletters_ItemAdd(ByVal item As Object)
On Error GoTo err_Handler
Set olItem = item.Forward
olItem.BCC = "Newsletters"
olItem.sEnd
lbl_Exit:
Exit Sub
err_Handler:
MsgBox Err.Number & " - " & Err.Description
GoTo lbl_Exit
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#2
|
|||
|
|||
|
Hello,
I was looking for a code like this to help me forward and move messages in the same time. I am new to vba and I am trying to identify how this code cand be modified so that it can work with folders from Outlook's personal folders, saved on the local disk, not on the server... Is there any way I can do such a think? If so, I have another problem: the folder that will be the object of this macro, also contains items (messages) that are auto-forwarded and moved by an outlook rule. This rule can't cover all the conditions that require moving and forwarding the specified items, so some of the messages have to be treated manually. That's why this code is perfect for what I need, but I have no ideea how can it be modified so that he will ignore messages that where moved and forwarded by the outlook rule...Can you please help me with an advise/solution? |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Rule to move sent messages to a specific folder
|
LouisOscar | Outlook | 1 | 08-17-2011 05:42 AM |
| Auto Forward Emails - Specific Time Periods Only | Dav | Outlook | 0 | 06-22-2011 12:03 PM |
Create Rule to forward message to mobile#
|
JoyConner | Outlook | 1 | 04-21-2011 05:44 PM |
| Forward Unread Messages after X Minutes? | BamaBrad | Outlook | 2 | 03-13-2011 07:57 AM |
| Code to auto-forward weekend messages | Whang | Outlook | 0 | 06-16-2010 02:18 PM |