I take it SentOn is a custom field? If so you need the following syntax:
Item.UserProperties.Find("SentOn").Value
You can't refer to custom fields with the Item.FieldName syntax. That's only
for standard built in fields.

Signature
Patricia Cardoza
Outlook MVP
www.cardozasolutions.com
Author, Special Edition Using Microsoft Outlook 2003
***Please post all replies to the newsgroups***
> Can anyone tell me why I keep getting this error message when I am
> trying to get the value of Item.SentOn
[quoted text clipped - 131 lines]
> Set MyPage = Nothing
> End Function
Tony - 26 Jan 2004 17:20 GMT
After I made a few changes I got it to work by doing what you said.
I thought I was using the OL Field "sent" on my form, but after
hearing you explain it, it made better since. I wanted the sent date
to show on the read page but when I called it I just wanted to grab
the senton data and send it to my word bookmark. Can this be done?
This is what I currently used and it seemed to work.
Set MailedOn = MyPage.MailedOn
Now the problem moved on down the list to another field.
This is another OL Field (The "To" filed) that is on the form but when
I tried to do it the same way I did above I am back to Square 1
("Object Does not support this property of method").
I have tried multiple variations of this, presently I am on this one.
I think it is the closest solution I have so far. All I get is either
"Object does not support this" or "Object Required".
Here is what the code looks like
Dim Mgr
objWord.ActiveDocument.Bookmarks("Mgr").Select
Set Mgr = MyPage.Mgr
If Mgr = True then
Mgr = "Yes"
ElseIf Mgr = False then
Mgr = ""
End If
objWord.Selection.TypeText Cstr(Mgr)
Set Mgr = Nothing
I tried it this way as well and got the same message.
Dim Mgr
objWord.ActiveDocument.Bookmarks("Mgr").Select
Set Mgr = MyPage.Mgr
objWord.Selection.TypeText Cstr(Mgr)
Set Mgr = Nothing
Any Suggestions
Thanks.
> I take it SentOn is a custom field? If so you need the following syntax:
>
> Item.UserProperties.Find("SentOn").Value
>
> You can't refer to custom fields with the Item.FieldName syntax. That's only
> for standard built in fields.
Sue Mosher [MVP] - 30 Jan 2004 01:54 GMT
What are MyPage and MyPage.Mgr? Which statement triggers the error message?

Signature
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
> Now the problem moved on down the list to another field.
> This is another OL Field (The "To" filed) that is on the form but when
[quoted text clipped - 23 lines]
> objWord.Selection.TypeText Cstr(Mgr)
> Set Mgr = Nothing