CC Field Populated via a Dropdown List

S

Sue Mosher [MVP-Outlook]

What specifically did not work?

Also, before you go too far down this road, I feel the need to caution you
that using a custom message form introduces all kinds of quirks and
limitations, including possible problems with attachments for non-Outlook
recipients. See http://www.outlookcode.com/article.aspx?id=61
 
M

Meredith

When I choose the recipient, it does populate the cc field accordingly.
However, it does not send - I receive the "operation failed" message. As for
quirks, I do not have intentions of sending this to external domains - it's
strictly an internal Human Resources form based on Outlook. Thanks for your
help!
 
S

Sue Mosher [MVP-Outlook]

Are you saying that the error occurs when the user clicks Send? Are the
recipients all resolved? Did you do anything else in the form design?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
M

Meredith

Not quite sure what you mean by "resolved" but the error does occur upon
clicking send.
 
S

Sue Mosher [MVP-Outlook]

"Resolved" means that each recipient in the To, Cc, and Bcc boxes is
underlined, indicating that the name or address entered has been resolved
into a valid email address that Outlook can send to.

As discussed at the link you cited, using a "Calculate
this formula automatically" formula to populate the Cc property doesn't
work. You need to use VBScript code. Is that what you're doing? If so, please
show your code. If not, you'll need to add the code, which you can put
together from the aforementioned discussion and the information at
http://www.outlookcode.com/article.aspx?ID=38 on the events that fire when
the user interacts with controls on a form.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
M

Meredith

Without a script, it doesn't resolve. With a script (I took the script from
the aforementioned link and manipulated "sponsor" to my list name) it
resolves it as a second name on the cc line - first is just Meredith Start,
second is my name underlined. Not sure what I'm doing wrong but the
operation failed message comes up either way.
 
S

Sue Mosher [MVP-Outlook]

Please show the code you're using. Are you calling Resolve after adding each
recipient?
 
M

Meredith

The code I'm using is below. By "resolving" do you mean clicking check names?

Function Item_Send()
Const olCC = 2
Set recip = Item.Recipients.Add(Item.UserProperties("ELTlist"))
If recip.Resolve Then
recip.Type = olCc
Else
Item_Send = False
recip.Delete
MsgBox "The ELT Member name -- " & _
Item.UserProperties("ELTlist") & _
" -- could not be resolved to an address."
End If
End Function
 
S

Sue Mosher [MVP-Outlook]

Calling Resolve All programmatically is the equivalent of clicking the Check
Names button. Resolve resolves a only single Recipient. From your earlier
description, it sounds like the first recipient is not resolving when the
item is sent. Thus, you might want to call ResolveAll instead of Resolve and
cancel the send if it doesn't return True.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 
M

Meredith

I think I may just give up! I typed resolve all instead of then and it looks
for "then"...
 
S

Sue Mosher [MVP-Outlook]

Sorry, but I don't understand what you're saying. ResolveAll is a method,
similar to Resolve. If you need more details on how to use it, you can look
it up in the object browser (F2 in VBA) and Help.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
 

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