Referencing custom fields using VB Script in Outlook 2003

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
 
G

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
 
G

GaryB

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top