PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook Form Programming SentOnBehalfOfName-Custom reply form with OnBehalfAddress in combo

Reply

SentOnBehalfOfName-Custom reply form with OnBehalfAddress in combo

 
Thread Tools Rate Thread
Old 08-06-2006, 01:10 AM   #1
=?Utf-8?B?TmF0aGFu?=
Guest
 
Posts: n/a
Default SentOnBehalfOfName-Custom reply form with OnBehalfAddress in combo


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@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@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

  Reply With Quote
Old 19-07-2006, 10:45 PM   #2
Sue Mosher [MVP-Outlook]
Guest
 
Posts: n/a
Default Re: SentOnBehalfOfName-Custom reply form with OnBehalfAddress in combo

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@discussions.microsoft.com> wrote in message news:FAF1C6B8-FDCF-4DFA-86A2-18AAFFC30ACF@microsoft.com...
> 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@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@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
>

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off