I am writing a VB application that uses Active Messaging to send a message.
My VB code that sends the message is as follows:
Private Sub cmdSend_Click()
Dim oMessage As Message
Dim oRecipient As Recipient
Dim oField As Field
Set oMessage = mSession.Outbox.Messages.Add
.Subject = "Test Message"
.Type = "IPM.NOTE.MYMESSAGE"
Set oField = .Fields.Add("Test", vbInteger, 5)
MsgBox oField.Name & oField.Value
Set oRecipient = oMessage.Recipients.Add
.Name = "My User"
.Type = mapiTo
The code in my outlook form is as follows:
set mThisItem = Application.ActiveInspector.CurrentItem
msgBox mThisItem.UserProperties.count ' This returns 0
msgBox mThisItem.UserProperties.Item("Test").Value 'This returns an error
The problem that I am having is accessing the "Test" field in my outlook
form. Can anyone give me an idea of what I am doing wrong here?
Thanks in advance,