Save Prompt comes though nothing changed

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
 
K

Ken Slovak - [MVP - Outlook]

Obviously something is changing. I'd be inclined to suspect filling the
combo's is the culprit but that you'd have to verify by stepping your code
and seeing when the item.Saved property becomes False.
 

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