Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Looking for a way to open a specific Outlook folder when a user clicks on a
command button in Excel. If Outlook is not currently running, I also need the code to launch Outlook and then go to the specified folder. Is this possible? Anyone any ideas please? Many thanks for your time. Rob. |
#2
![]() |
|||
|
|||
![]()
Here is a sample that would open the Contacts folder. After opening the VBE
editor, you would set a reference to Microsoft Outlook nn Object Library (in my case, nn is 11.0). Then the following routine would display the Contacts folder. Sub ShowContacts() Dim olApp As Outlook.Application Dim olNS As Outlook.Namespace Dim fdContacts As Outlook.MAPIFolder Set olApp = New Outlook.Application Set olNS = olApp.GetNamespace("MAPI") Set fdContacts = olNS.GetDefaultFolder(olFolderContacts) fdContacts.Display End Sub Steve "Rob Keel" wrote in message ... Looking for a way to open a specific Outlook folder when a user clicks on a command button in Excel. If Outlook is not currently running, I also need the code to launch Outlook and then go to the specified folder. Is this possible? Anyone any ideas please? Many thanks for your time. Rob. |
#3
![]() |
|||
|
|||
![]()
Thanks for that Steve. Got that working fine however, how would I
reference a Public Folder? i.e. path is (in Outlook Folder list) Public Folders\All Public Folders\MyFolder How would I refer to and open MyFolder? Thanks. Rob. Steve Yandl wrote: Here is a sample that would open the Contacts folder. After opening the VBE editor, you would set a reference to Microsoft Outlook nn Object Library (in my case, nn is 11.0). Then the following routine would display the Contacts folder. Sub ShowContacts() Dim olApp As Outlook.Application Dim olNS As Outlook.Namespace Dim fdContacts As Outlook.MAPIFolder Set olApp = New Outlook.Application Set olNS = olApp.GetNamespace("MAPI") Set fdContacts = olNS.GetDefaultFolder(olFolderContacts) fdContacts.Display End Sub Steve "Rob Keel" wrote in message ... Looking for a way to open a specific Outlook folder when a user clicks on a command button in Excel. If Outlook is not currently running, I also need the code to launch Outlook and then go to the specified folder. Is this possible? Anyone any ideas please? Many thanks for your time. Rob. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cannot open excel files attached to outlook | Excel Discussion (Misc queries) | |||
Excel attachments open in outlook 2002 as TMP files | Excel Discussion (Misc queries) | |||
Stop excel emedding (opeing in mail format) when outlook is open. | New Users to Excel | |||
Excel Spreadsheet email attachment unable to open in Outlook Expr. | Excel Discussion (Misc queries) | |||
linking an excel document to my task folder in outlook | Excel Discussion (Misc queries) |