Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this series, we will concentrate on how we can get the IMF SCL rating programmatically with Outlook 2003/2007 by calling the getSCL() method:
'[Outlook VBA : Code snippet]
...
Sub getSCL()
…
Set inbox = Outlook.ActiveExplorer.CurrentFolder
Set items = inbox.items
'Implement Unstructured Exception handle
On Error Resume Next 'should it encounter an error, it will proceed to the next item.
For Each item In items
If item.Class = olMail Then
Set mail = item
'creates a user property called “SCL Rating” and adds the property to the folder
Set sclProp = mail.UserProperties.Add("SCL Rating", olText, True)
'schema value for PR_CONTENT_FILTER_SCL
strSCL = mail.PropertyAccessor.GetProperty("https://schemas.microsoft.com/mapi/proptag/0x40760003")
sclProp.Value = strSCL
mail.Save
'saves the prop to the mail item
End If
Next
Set sclProp = Nothing
…
End Sub
....