C
cmonroe21 via OfficeKB.com
I am creating a custom OL2007 task form with coding in Outlook. I saw the
outlookcode.com page "Syntax for outlook property and form control values and
events" and got the PropertyChange fucntion to work with a case statement
(see first two lines of case statement). But when I want to change the value
of the field that I want to it doesn't work. A little background, I have a
text box named txtTestBox bound to a user-defined field "TestBox". I know my
function and case statement works, but how do I grab my user-defined field to
manipulate it like I could the message box and the task.subject? I tried
SEVERAL different syntaxes, as you can see below, but I think it's obvious
I'm clueless. (Note-- I thought I would use the PropertyChange function
rather than the CustomPropertyChange because I did not create a custom
property... I created a custom field but not a custom property... but it will
only work with CustomPropertyChange??) (And yes, I only try the lines in the
case statements one at a time.)
Any input??
Sub Item_CustomPropertyChange(ByVal Name)
on error resume next
Select Case Name
Case "Field1"
'MsgBox "You changed Field1" 'works
'Item.subject = "Works!" 'works
'Item.TestBox.text = "works!" 'doesn't work??
'Item.TestBox.value= "works!" 'doesn't work??
'TestBox.text = "works!" 'doesn't work??
'TestBox.value = "works!" 'doesn't work??
'Item.TestBox = "works!" 'doesn't work??
'TestBox = "works!" 'doesn't work??
End Select
End Sub
outlookcode.com page "Syntax for outlook property and form control values and
events" and got the PropertyChange fucntion to work with a case statement
(see first two lines of case statement). But when I want to change the value
of the field that I want to it doesn't work. A little background, I have a
text box named txtTestBox bound to a user-defined field "TestBox". I know my
function and case statement works, but how do I grab my user-defined field to
manipulate it like I could the message box and the task.subject? I tried
SEVERAL different syntaxes, as you can see below, but I think it's obvious
I'm clueless. (Note-- I thought I would use the PropertyChange function
rather than the CustomPropertyChange because I did not create a custom
property... I created a custom field but not a custom property... but it will
only work with CustomPropertyChange??) (And yes, I only try the lines in the
case statements one at a time.)
Any input??
Sub Item_CustomPropertyChange(ByVal Name)
on error resume next
Select Case Name
Case "Field1"
'MsgBox "You changed Field1" 'works
'Item.subject = "Works!" 'works
'Item.TestBox.text = "works!" 'doesn't work??
'Item.TestBox.value= "works!" 'doesn't work??
'TestBox.text = "works!" 'doesn't work??
'TestBox.value = "works!" 'doesn't work??
'Item.TestBox = "works!" 'doesn't work??
'TestBox = "works!" 'doesn't work??
End Select
End Sub