Using "Item.GovernmentIDNumber" instead of
"Item.UserProperties.Find("GovernmentIDNumber" , False)" has worked.
many thanks
"Sue Mosher [MVP-Outlook]" wrote:
If the form doesn't run code after you have sent or saved an item using the published form, you probably have done something to "one-off" the form. Outlook 2003, Outlook 2002, Outlook 2000 SP2 and Outlook 2000 or 98 with the Email Security Update will not run code on one-off forms; see http://www.outlookcode.com/d/secforms.htm for more information on this issue.
GovernmentIDNumber is a built-in property, not a custom property. You should access it with Item.GovernmentIDNumber, not through the UserProperties collection.
FYI, there is a newsgroup specifically for Outlook forms issues "down the hall" at microsoft.public.outlook.program_forms or, via web interface, at http://www.microsoft.com/office/comm...rogram_f orms
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
"j1313" wrote in message ...
If I open a new form then save it its all good but if i then try to edit this
new contact, the VB script in the form is disabled and events do not take
place (eg at contact item write).
Some things I've tried:
* I Opened the newly saved contact where the scripts don't work and went to
tools/forms/design this form, and then in the form design window to form/view
code and the script code is all there. I go to form/run this form and the
form runs with the scripts.
I've narrowed things down to using method: "item.UserProperties.Find"
in
Function Item_Write()
...
item.UserProperties.Find("GovernmentIDNumber", False)
#############################################
.
.
.