L
Leon Mayne
Hello,
I have the below code:
Set objCDO = CreateObject("MAPI.Session")
objCDO.Logon "", "", False, False
Set oOL = CreateObject("Outlook.Application")
For x = 1 To oOL.ActiveExplorer.Selection.Count
strID = oOL.ActiveExplorer.Selection.Item(x).EntryID
'Now get the item as a CDO Message
Set objMessage = objCDO.GetMessage(strID)
' Do stuff
Next
Which works fine if I am getting the message from the default container, but
if not, I get an error (obviously). So I need to specify the StoreID of the
current message thus:
Set objMessage = objCDO.GetMessage(strID, strStoreID)
but I can't find out how to get the current StoreID. Can anyone help?
I have the below code:
Set objCDO = CreateObject("MAPI.Session")
objCDO.Logon "", "", False, False
Set oOL = CreateObject("Outlook.Application")
For x = 1 To oOL.ActiveExplorer.Selection.Count
strID = oOL.ActiveExplorer.Selection.Item(x).EntryID
'Now get the item as a CDO Message
Set objMessage = objCDO.GetMessage(strID)
' Do stuff
Next
Which works fine if I am getting the message from the default container, but
if not, I get an error (obviously). So I need to specify the StoreID of the
current message thus:
Set objMessage = objCDO.GetMessage(strID, strStoreID)
but I can't find out how to get the current StoreID. Can anyone help?