Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

outlook mapi folders?

Status
Not open for further replies.

Smithsco

Technical User
Mar 30, 2003
89
0
0
AU
I'm trying to create an extenal program to act like the rule wizard, I have reached the limit and still need to move more e-mails around.

I would like to be able to browse my folders and grab its outlook name (eg outlook.getnamspace("MAPI").folders.item(3).folder......). Is this possible?
 
This will display the MAPI Browse for Folder dialog and return the selected folder object.
Code:
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
On Error Resume Next
Set objFolder = objNS.PickFolder
On Error GoTo 0
If objFolder Is Nothing Then
 'User cancelled
 GoTo ExitSub
End If

Paul Bent
Northwind IT Systems
 
sorry for the delay, but when I run this objfolder end up returning the folder name value instead of the folders.item(3)....

is there any way to covert the name over or just pull it straight out when selecting the folder?

 
The code I posted returns a folder object From there you can return its Name property and access its subfolders or its items.

You originally asked:

>>to be able to browse my folders and grab its outlook name<<

Now you say:

>>is there any way to covert the name over or just pull it straight out when selecting the folder?<<

I suggest you read FAQ222-2244 then restate your question more precisely

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top