Enumerating messages in Outlook's Drafts folder generates an error I would like to enumerate the messages in Outlook's 'Drafts' folder.

When I run this script:

tell application "Microsoft Outlook"
  set theMessages to every message in the drafts
  --returns 1
  display dialog of (count of theMessages)
  repeat with theMessage in theMessages
    display dialog of the class of theMessage    -- displays 'inm'
    display dialog of the subject of theMessage  -- error here
  end repeat

end tell


I get an error that reads Microsoft Outlook got an error: Can’t make subject of outgoing message id 15002 into type string..

It seems like theMessage is the ID of the message, even though its class is 'inm' (guessing that this means inbox message).

If I cast theMessage to a Message:

display dialog of the subject of (theMessage as message)


I get a different error: Can’t make «class inm » id 15492 of application "Microsoft Outlook" into type message.

What am I not understanding?
The correct syntax:

display dialog of the (subject of theMessage as text)