guitardave78
Programmer
OK Guys, last one I hope.
This is the code i am useing (Thanks to IDE) to select a folder in Outlook from Excel
Dim myOlApp, myNameSpace, myFolder As Object
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
ActiveSheet.Range("A1".Activate
Set myFolder = myNameSpace.Folders(ActiveCell.Offset(0, 0).Value)
i = 1
'myFolder.display
While ActiveCell.Offset(0, i).Value <> "" 'step the path
Set myFolder = myFolder.Folders(ActiveCell.Offset(0, i).Value)
i = i + 1
Wend
'Set myFolder = Application.ActiveExplorer.CurrentFolder
The first cell in the spreadsheet is the frst part of the Outlook path eg public folders
second cell is second part eg
all public folders
etc.
What I want is to be able to Define the variable myFolder useing some form of browse form (ie when macro is run a form with a browse button and a file list), that can look at the outlook folders (Inbox, Tasks etc)
Is this possible!? This would make it more user freindly for some of my work mates!!
This is the code i am useing (Thanks to IDE) to select a folder in Outlook from Excel
Dim myOlApp, myNameSpace, myFolder As Object
Set myOlApp = CreateObject("Outlook.Application"
Set myNameSpace = myOlApp.GetNamespace("MAPI"
ActiveSheet.Range("A1".Activate
Set myFolder = myNameSpace.Folders(ActiveCell.Offset(0, 0).Value)
i = 1
'myFolder.display
While ActiveCell.Offset(0, i).Value <> "" 'step the path
Set myFolder = myFolder.Folders(ActiveCell.Offset(0, i).Value)
i = i + 1
Wend
'Set myFolder = Application.ActiveExplorer.CurrentFolder
The first cell in the spreadsheet is the frst part of the Outlook path eg public folders
second cell is second part eg
all public folders
etc.
What I want is to be able to Define the variable myFolder useing some form of browse form (ie when macro is run a form with a browse button and a file list), that can look at the outlook folders (Inbox, Tasks etc)
Is this possible!? This would make it more user freindly for some of my work mates!!