Because the fist one is correct way to do it
>
>All working fine now - thanks. Out of interest, could you tell me why the following code does work:
>
>
>loNameSpace=loApplication.GetNameSpace("MAPI")
>loOutBox=loNameSpace.GetDefaultFolder(4)
>oMessage=loOutBox.Items.Add
>oMessage.sentOnBehalfOfName = "admin@mycompany.com"
>
>
>BUT
>This code:
>
>oMessage=CREATEOBJECT("MSMAPI.MAPIMessages.1")
>oMessage.sentOnBehalfOfName = "admin@mycompany.com"
>
>
>... fails with OLE error code 0x80020006: Unknown name."
>
>Not really that important as I have got it working, but I would just like to try to learn as I go!
>
>Thank you again for your help
>Barry
>
--sb--