Example: How to use PS_INTERNET_HEADERS with cdo 1.21 for custom properties.
'This example uses PS_INTERNET_HEADERS for setting a custom property
const smbx="mymailbox" ' TODO: Change
const ssrv="myserver" ' TODO: Change
const mycdoInetPset = "8603020000000000C000000000000046"
const myXheader = "X-SPAM" ' TODO: Change to your property
set oses=createobject("mapi.session")
oses.logon "", "", false, true, 0, true, ssrv & vblf & smbx
set omsg=oses.inbox.messages.getfirst
sfrom=omsg.fields.item(myXheader,myCdoInetPset).value
wscript.echo sfrom
omsg.fields.add myXheader, vbString, "I Hate Spam!", myCdoInetPset
omsg.update
set omsg=nothing
set oses=nothing