![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#9
|
||||
|
||||
|
The particular error occurs because of the line
Code:
Sub MoveFolders() I see you have given separate variable names to each folder, but you have changed the folder names. The foldernames should reflect exactly the names of the folders - complete with spaces. What I was suggesting was that you name the variables to match the folders e.g. Code:
Set WSJEveningWrap = GetNS(olApp).GetDefaultFolder(olFolderInbox).Folders("Briefing").Folders("WSJ Evening Wrap").Items
You will need a separate sub for each of those folder variables Code:
Private Sub Newsletters9_ItemAdd(ByVal item As Object) etc Code:
SetNewsLetters9 = GetNS(olApp).GetDefaultFolder(WSJEveningWrap).Items Code:
Set NewsLetters9 = GetNS(olApp).GetDefaultFolder(olFolderInbox).Folders("Briefing").Folders("WSJ Evening Wrap").Items
Code:
Set WSJEveningWrap = GetNS(olApp).GetDefaultFolder(olFolderInbox).Folders("Briefing").Folders("WSJ Evening Wrap").Items
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Outlook rule to not send if attachment name doesn't match criteria
|
SerenityNetworks | Outlook | 10 | 03-20-2016 10:56 AM |
Want to set up a rule to move sent emails
|
mylan | Outlook | 2 | 07-08-2014 05:10 AM |
| Rule to remove duplicate emails? | ReviTULize | Outlook | 0 | 05-14-2013 01:15 PM |
| Rule doesn't work on BCC emails | LeakyMemory | Outlook | 0 | 04-21-2012 04:07 AM |
| Rule=Delayed send | markg2 | Outlook | 0 | 08-01-2010 07:23 AM |