Hi,
I have a basic understanding of Outlook VBA, but what I want to achieve is, as I understand, fairly simple.
I would like to create a button which when pressed shows a particular Public Folder. I have some code that allows me to find and return a unique ID for a given public folder, which is the first part solved. I also have some code which shows the correct folder. The code is...
Private Sub GetFolderFromID()
Dim olfolder As Outlook.MAPIFolder
Dim olapp As Outlook.Application
Set olapp = CreateObject("Outlook.Application")
Set olfolder = olapp.GetNamespace("Mapi").GetFolderFromID("InsertEntryIDHere")
olfolder.Display
Set olfolder = Nothing
Set olapp = Nothing
End Sub
The only problem with this code is it opens a new and separate Outlook application session, where I would prefer it to open in the current session. How can I tweak my code to show in the current session instead?
Many thanks