Dear All,
I need help with the following ..I want to have a Macro which can creat folders in outlook 2007 using the List in Excel 2007 as a master sheet..Attached is the worksheet detailing the request ..I have not worked on this as I am not sure about the possibility so there are no macros in the attached sheet ..
N![]()
Last edited by nuttycongo123; 03-06-2011 at 02:38 AM.
I guess the code is
any suggestions'code supplied by Simon Lloyd '25/02/2011 'Microsoft Office Help Sub CreateFolders() Dim FSOobj As Object, Rng As Range, MyCell As Range Set FSOobj = CreateObject("Scripting.FilesystemObject") Set Rng = Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row) For Each MyCell In Rng If MyCell = "" Then GoTo Nxt If FSOobj.FolderExists(ThisWorkbook.Path & "\" & MyCell.Value) = False Then FSOobj.CreateFolder ThisWorkbook.Path & "\" & MyCell.Value ' or set a path like this "C:\MyFile\" & MyCell.Value Else MsgBox "Folder named " & MyCell.Value & " Exists" End If Nxt: Next MyCell Set FSOobj = Nothing End Sub
Regards
N![]()
Hi Nutty
Try the code in the attached. It works for me. If you want colors, you'll need to have someone else involved. I'm colorblind.
All code from
http://www.codeforexcelandoutlook.co...ly-in-outlook/
I forgot to mention that you'll need to set a reference to Microsoft Outlook Object Library.
Last edited by jaslake; 03-04-2011 at 01:45 PM.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Dear J,
This Looks fine I will get back to you once i have tested it ...Thank you for always being there
Regards
N
Dear J ,
Observation : The Folders are getting created in default "INBOX" folder in my mail box .
Target Modification:1/ To creat folder in a desired folder eg:"Account Information "which is nested in "Archived Folder "in outlook 2007. Here in attached is the dummy sheet explaining it .I dont have a archived folde in the outlook now so I aam explaing it by creating subfolders in the main folder "INBOX"
2/ All the incoming e mails should automaticall open in the "Archived folder" instead of "INBOX" in my mail box .
Regds
N![]()
Hi Nutty
I'd like you to take the time to review your needs. I'm spending considerable time working FOR you and your needs change like I change skivvies (look it up). Much of your current requirements as indicated on your most recent file are not included in earlier Threads. Now, I know needs change...however...you need to define the project. Else, you'll drive us all "Nutty".
Get back to me and let me know IF your latest post IS what you need. Is there ANYTHING else?
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Hi Nutty
PerhapsDepending on what dictionary you used when you looked it up, that could be assumed. The broad definition is "undergarments" and most women I've known also wear "undergarments" so, I wouldn't rule out "cross dressing" as a sport.Onething is sure about you now is ...that you are not a cross dresser
However, that's not relevant to the issue (whether I do or don't). The relevant issue is you need to know what you wish to do so I know what you wish to do.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
point taken
Regards
N![]()
Hi Nutty
The code in the attached will create a new folder in Personal Folders called "Archived Mail". Within that folder, it'll create Sub Folders for any items that exist in Column D of the attached worksheet. Based on your sample file, you'll see this in Outlook Folders.jpg.
To retrieve Emails into these folders, you'll need to set up RULES in Outlook (Tools -> Rules and Alerts -> New Rule -> Move Message with specific words... -> Move to specified folder _> etc.
Were I you, I would NOT get too specific on the Word...I'd use "Red", "Green", etc. It's been tested and, believe it or not, works (sort of surprised myself).
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
Dear J,
I can not be thankful enough for all your attention and help..this is exactly all I needed.
P.S I track your threads very keenly they make a goodlearning resourse..
Regards
N![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks