Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2013, 05:11 PM
aaroncrt aaroncrt is offline Outlook VBA to move selected email to a public folder Windows 7 32bit Outlook VBA to move selected email to a public folder Office 2010 32bit
Novice
Outlook VBA to move selected email to a public folder
 
Join Date: Oct 2013
Posts: 2
aaroncrt is on a distinguished road
Default

Thanks for the reply.

I managed to get it working by searching the Public Folders sub folders for a match to the input variable string.
I added the following.

Code:
ReDim sArray(0) As String
If fld.Folders.Count Then
             
  For i = 1 To fld.Folders.Count
    If Left(fld.Folders(i).Name, 3) = strProject Then
        iElement = IIf(sArray(0) = "", 0, UBound(sArray) + 1)
        ReDim Preserve sArray(iElement) As String
        sArray(iElement) = fld.Folders(i).Name
    End If
  Next i

Reply With Quote
Reply

Tags
public folder, script, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forwarding email from a public folder to my Inbox ray500 Outlook 2 08-23-2016 07:20 AM
how to move the email directly to secondary mailbox sent item folder gregory Outlook 2 04-28-2012 01:21 AM
Outlook for Mac 2011 - public folder drag/drop LakeShoreDriving Outlook 0 04-09-2012 11:27 PM
Outlook VBA to move selected email to a public folder User cannot move email messages within Outlook Inbox folder and sub-folders. Darsss Outlook 5 06-06-2011 11:37 PM
Outlook VBA to move selected email to a public folder Forwarding email from a Public Folder ray500 Outlook 1 08-20-2010 03:06 PM

Other Forums: Access Forums

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


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