Advertisement

07.16.2008 at 10:57AM PDT, ID: 23570636
[x]
Attachment Details

Outlook Email Folder Names

Asked by eghtebas in Microsoft Access Database, Visual Basic Programming, Outlook Groupware Software

At:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_23567902.html

I have a good solution from Rick_Rickards, I like to revise it to read the folder name that have or can have emails (not interested in folders like calendar or Journal, etc.). I want to read these folder names to populate a table in access (later to populate a combo box for user to pick a folder ....).

The existing code is included below.

Question: How can I revise it so that it will read the name of folder created to contain email messages?

Thank you,

Mike
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
Sub Sample()
    Dim outApp As New Outlook.Application
    Dim outNS As Outlook.NameSpace
    Dim outFdr  As Outlook.MAPIFolder
    Set outNS = outApp.GetNamespace("MAPI")
    For Each outFdr In outNS.Folders
        OMF2 outFdr
    Next outFdr
End Sub
 
Function OMF2(F As Outlook.MAPIFolder, Optional lngLayer As Long = 0)
    Dim lng As Long
    'Debug.Print Space(lngLayer * 3) & f.Name
    CurrentDb.Execute "Insert Into tOLK_Folders(Folder,Class,CurrentView,Description,FolderPath) Values('" & F.Name & "', '" & CStr(F.Class) & "', '" & CStr(F.CurrentView) & "', '" & F.Description & "', '" & F.FolderPath & "')"
    For lng = 1 To F.Folders.Count
        OMF2 F.Folders(lng), lngLayer + 1
    Next lng
End Function
[+][-]07.16.2008 at 11:07AM PDT, ID: 22018543

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Microsoft Access Database, Visual Basic Programming, Outlook Groupware Software
Sign Up Now!
Solution Provided By: Rick_Rickards
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.16.2008 at 11:14AM PDT, ID: 22018615

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 11:16AM PDT, ID: 22018629

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 11:17AM PDT, ID: 22018641

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 12:36PM PDT, ID: 22019331

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 12:45PM PDT, ID: 22019421

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 01:11PM PDT, ID: 22019669

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 02:35PM PDT, ID: 22020429

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 02:43PM PDT, ID: 22020498

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.16.2008 at 02:45PM PDT, ID: 22020513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906