Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Extract Folders Name From Outlook to Excel

Hi ,
In our outlook, we have more than 200 sub folders.
Like INBOX
Jan2000_USA
Feb2000_UK
................
Now we want to modify the sub folders name. So that can you suggest how to
Extracting all the outlook folders name to excel.

Thanks in advance in your reply
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default Extract Folders Name From Outlook to Excel

Private R As Integer

Sub ListOLinboxFolders()

Const olFolderInbox = 6

R = 0

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")

Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)

GetSubfolders objInbox

Set objNamespace = Nothing
Set objOutlook = Nothing

End Sub

Sub GetSubfolders(objParentFolder)

R = R + 1

Set colFolders = objParentFolder.Folders
For Each objFolder In colFolders
Set objSubfolder = objParentFolder.Folders(objFolder.Name)
Cells(R, 1).Value = objFolder.Name
GetSubfolders objSubfolder
Next objFolder
End Sub

_____________________________

Steve


"Vadhimoo" wrote in message
...
Hi ,
In our outlook, we have more than 200 sub folders.
Like INBOX
Jan2000_USA
Feb2000_UK
................
Now we want to modify the sub folders name. So that can you suggest how to
Extracting all the outlook folders name to excel.

Thanks in advance in your reply



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Extract Folders Name From Outlook to Excel

Hi,
I saw this post and it was very helpful. Is there a way from excel vba to
copy a specific file (word.doc) into a specific outlook mail folder?

Tahanks for any help.

peter


"Steve Yandl" wrote:

Private R As Integer

Sub ListOLinboxFolders()

Const olFolderInbox = 6

R = 0

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")

Set objInbox = objNamespace.GetDefaultFolder(olFolderInbox)

GetSubfolders objInbox

Set objNamespace = Nothing
Set objOutlook = Nothing

End Sub

Sub GetSubfolders(objParentFolder)

R = R + 1

Set colFolders = objParentFolder.Folders
For Each objFolder In colFolders
Set objSubfolder = objParentFolder.Folders(objFolder.Name)
Cells(R, 1).Value = objFolder.Name
GetSubfolders objSubfolder
Next objFolder
End Sub

_____________________________

Steve


"Vadhimoo" wrote in message
...
Hi ,
In our outlook, we have more than 200 sub folders.
Like INBOX
Jan2000_USA
Feb2000_UK
................
Now we want to modify the sub folders name. So that can you suggest how to
Extracting all the outlook folders name to excel.

Thanks in advance in your reply




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exchange 2007 Publuc Folders and ISA 2006 and Outlook anywhere Mark A. Dudley Excel Discussion (Misc queries) 2 February 25th 11 06:35 PM
Emails in 2 folders. Outlook 2007 lukepw Excel Discussion (Misc queries) 2 May 19th 08 03:24 PM
Hyperlink to Outlook Public Folders SueD Links and Linking in Excel 0 January 18th 06 10:37 AM
How do move folders from web based email account to outlook? Tracy Excel Discussion (Misc queries) 1 November 18th 05 08:33 PM
Excel & Outlook Personal Folders Shackdelta Excel Discussion (Misc queries) 0 November 10th 05 07:22 PM


All times are GMT +1. The time now is 08:40 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"