email wrod form based on drop down value

S

Sabosis

Hello-

I have a form in word witha drop down field. I have a submit bottom at
the bottom of the form and I want the form to email as an attachment
using code to determine the email address. The code in the "submit"
button should reference the drop down field to determine the
recipient.

For example:

If the dropdown = "service", then email (e-mail address removed)
If the dropdown = "sales", then email (e-mail address removed)
If the dropdown = "billing", then email (e-mail address removed)

Can this be done? I have other forms that mail to a specified address
as an attachemnt, but do not know how to have a field refernced like
this. Please help.....

Thanks-

Scott
 
D

Doug Robbins - Word MVP

Use

Dim Department As String, emailaddress As String
Dim i As Long

With ActiveDocument.FormFields("DropDownName").DropDown
i = .Value
Department = .ListEntries(i)
Select Case Department
Case "service"
emailaddress = "(e-mail address removed)"
Case "sales"
emailaddress = "(e-mail address removed)"
Case "billing"
emailaddress = "(e-mail address removed)"
End Select
End With




--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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