If OnBehalfEntry is the property that's changing, i.e. the property bound to the combo box, why aren't you using Item.UserProperties("OnBehalfEntry") to return its value directly?
I wonder if it would work better if you changed SentOnBehalfOfName to "" before resetting it.
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nathan" <Nathan[ at ]discussions.microsoft.com> wrote in message news:FAF1C6B8-FDCF-4DFA-86A2-18AAFFC30ACF[ at ]microsoft.com...
[Quoted Text] > Hello, > > I am a newbie in the development of custom forms. > I am currently modifying an existing custom reply form. > > The form has some standard field (to,cc,subject) and it has a combo box of > email addresses, that the user can reply on behalf of. > > If the user doesn’t have the permission to send on behalf of an email > address(e.g 1[ at ]company.com), I get the message: > You do not have the permission to send the message on behalf of the > specified user. > > This is understandable. But after this error, even if I choose another email > address from the combo box (e.g 2[ at ]company.com), for which he has the delivery > options correctly configured. I still see the error, though the permissions > are correct. > > SentOnBehalfOfName is changed on a combo box selection change like below: > > <Codesnippet> > Sub Item_CustomPropertyChange(ByVal sName) > If sName = "OnBehalfEntry" Then > Set objListBox= > Item.GetInspector.ModifiedFormPages("Message").Controls("OnBehalfAddressComboBox") > If objListBox.Enabled Then > sSentOnBehalfValue= objListBox.Value > Item.SentOnBehalfOfName = sSentOnBehalfValue > End If > Set objListBox= Nothing > End If > End Sub > > If I try to set it in the Item_send function, It seems to be too late and > the change never shows up in the sent email. > > Any suggestions/comments? > > Thanks, > Nathan >
|