vbaoutlooklivelink

Retrieving OutlookID of a Livelink folder


I'm trying to get the Outlook ID of a Livelink folder within my VBA project (the default VbaProject.otm). It would allow me to quickly move mails from Outlook to Livelink. I already have the Livelink folder ID but I know that Outlook has its own.

I can get the Livelink StoreID with the following:

storeID = Application.GetNamespace("MAPI").Folders("LiveLink").storeID

Now, I have no idea how I could get the Outlook ID. Here is one example of what it looks like:

00000000524436FBAAD59A46B79DBE44072FFD06010000007A010000307E7E2D317E305C307E4C6976656C696E6B204851457E307E2D315C307E4C6976656C696E6B204851457E2D357E305C307E4C6976656C696E6B204851457E313233373235387E2D355C307E4C6976656C696E6B204851457E31303233363334317E313233373235385C307E4C6976656C696E6B204851457E31323930393430387E31303233363334315C307E4C6976656C696E6B204851457E31343539333439307E31323930393430385C307E4C6976656C696E6B204851457E31383735353632377E31343539333439305C307E4C6976656C696E6B204851457E3131313833393433357E31383735353632375C307E4C6976656C696E6B204851457E3131313833393433387E3131313833393433355C307E4C6976656C696E6B204851457E3131313833393436367E3131313833393433385C307E4C6976656C696E6B204851457E3131313834313634367E3131313833393436365C307E4C6976656C696E6B204851457E3131363035373238377E313131383431363436

Anyone has an idea? Thank you.

Daniel


Solution

  • Take a look at Outlook Spy or MFCMapi. The ID is probably contained as a MIME property you can access via Folder.PropertyAccessor. See related SO post.

     Dim liveLinkFolder as Outlook.Folder = Application.GetNamespace("MAPI").Folders("LiveLink")
     Dim id as String = liveLinkFolder.PropertyAccessor.GetProperty("LiveLink ID").ToString()