S
shubhangi
hello
I've VSTO addin for OL2007.I've shown form region as separate page for
contact form.
On that region I've placed AX ctl consisting of 2 comboboxes.When user
changes
combobox contents I invoke below Proc in AX ctl
Public Sub AddModifyUserProp(ByVal PropName As String, ByVal PropValue As
String)
Dim ObjContactItem As Outlook.ContactItem
Set ObjContactItem = ActiveInspector.CurrentItem
If Not ObjContactItem Is Nothing Then
Dim userProperty As Outlook.userProperty
Set userProperty = ObjContactItem.UserProperties.Find(PropName,
True)
If userProperty Is Nothing Then
Set userProperty = ObjContactItem.UserProperties.Add(PropName,
olText, True)
End If
If Not userProperty Is Nothing Then
userProperty.Value = PropValue
Set userProperty = Nothing
End If
Set ObjContactItem = Nothing
End If
End Sub
When User changes something in any of combo on form region ,Outlook prompts
for save,
If user clicks No,Item gets closed.But when same contact is opened ,without
changing
anything closed,Outlook again prompts for change(though nothing changed).
I've released alll objects.What might be the reason,is it related to form
region or
something else?
Thanks in Advance
I've VSTO addin for OL2007.I've shown form region as separate page for
contact form.
On that region I've placed AX ctl consisting of 2 comboboxes.When user
changes
combobox contents I invoke below Proc in AX ctl
Public Sub AddModifyUserProp(ByVal PropName As String, ByVal PropValue As
String)
Dim ObjContactItem As Outlook.ContactItem
Set ObjContactItem = ActiveInspector.CurrentItem
If Not ObjContactItem Is Nothing Then
Dim userProperty As Outlook.userProperty
Set userProperty = ObjContactItem.UserProperties.Find(PropName,
True)
If userProperty Is Nothing Then
Set userProperty = ObjContactItem.UserProperties.Add(PropName,
olText, True)
End If
If Not userProperty Is Nothing Then
userProperty.Value = PropValue
Set userProperty = Nothing
End If
Set ObjContactItem = Nothing
End If
End Sub
When User changes something in any of combo on form region ,Outlook prompts
for save,
If user clicks No,Item gets closed.But when same contact is opened ,without
changing
anything closed,Outlook again prompts for change(though nothing changed).
I've released alll objects.What might be the reason,is it related to form
region or
something else?
Thanks in Advance