Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Outlook Newsgroups
Outlook VBA Programming
Move item between folders
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Ken Slovak - [MVP - Outlook], post: 4878097"] The declaration for colFolderItems needs to be at class level outside of the startup procedure so it stays alive after that procedure ends. You'd also need to have the items you're adding to the collection already instantiated of course. To instantiate a Class1 object do this: Dim oClass As New Class1 You then need to set oClass (Class1) Folder and Items properties so those should be Public: ' in Class1 Public WithEvents colItems As Outlook.Items Public oFolder As Outlook.MAPIFolder Now assuming you have the folders you want as oFolder1 and oFolder2 you'd do this: Set oClass.oFolder = oFolder1 Set oClass.colItems = oFolder1.Items and repeat with a new instance of Class1 for each folder such as oFolder2. Of course you'd need code to declare and instantiate all the folders you want to monitor. [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Outlook Newsgroups
Outlook VBA Programming
Move item between folders
Top