Referencing custom fields using VB Script in Outlook 2003

  • Thread starter Thread starter GaryB
  • Start date Start date
G

GaryB

Hi,

I'm obviously missing something very simple here! I'd like to set the
value of a custom text field when the user clicks an option button.

The following doesn't work - for reasons that must be obvious to
someone out there:

Sub obtnPhone_Click
[TypeOfComplaint] = "Phone"
End Sub

It seems that I am not referencing the field (TypeOfComplaint)
correctly, because when I change the code to:

Sub obtnPhone_Click
[To] = "Phone"
End Sub

It works as expected.

I'd be very grateful for the help of some kind soul...

Thanks very much.

Rgds

GaryB
 
Hi,

Well, it seems to be sorted, with:

Sub obtnPhone_Click
Item.UserProperties("TypeOfComplaint") = "Phone"
End Sub

But, I also had to delete all other versions and references to the
field first - (Delete all controls referring to [TypeOfComplaint];
Refresh Field Chooser and delete the field and; Click on All Fields and
delete the field) - then recreate using Field Chooser.

Hope it saces some other newby from the problem.

Rgds

GB
 
Thanks, Sue - finally got my head around it, with the help of your
site. I'll contact you offline as soon as I've completed a website
upgrade.

Rgds

GB
 
Back
Top