Create & Send Email

R

ridawg

I've created a form for logging calls. Essentially, the form is used by one
person and they enter all their calls into this one form (kind of like the
asset template where you just click insert to insert a new asset). So the
form would have 1 to many calls. I would like to create an email button that
would create an email message based on the call information entered (ie.
subject would be equal to Call Subject, body would be equal to call id & call
description, etc).

I'm not sure if this is possible and if possible how to actually do it. I'm
not that familiar with xml or jscript. I've created email stuff using
vbscript (which I prefer to use vs. jscript), asp/vbscript, asp.net/vb.net,
and vba. With my current setup I'm limited to jscript, vbscript & vba.

I guess I'm not sure how much control I have over the creation of the email.
I don't want to send the whole form just data related to this particular call
and even then not all the data but a certain subset of the call data. I
thought the best way to do this would be to create a button that is part of
my repeating table but I'm not sure how to make it directly related to that
call instance or how to actually create the email message with only certain
fields vs. sending the entire form

Hope what I wrote makes sense! Any help would be greatly appreciated!
 
J

JerryTh [MSFT]

The Email Submit Adapter (Designer: Tools / Submitting Forms) allows you
reference fields to be used in the mail envelope (To, Subject, etc).

If you would prefer to avoid script, you could put a button in each table
row.
Clicking a rows button would copy that data to a set of fields (outside of
the table).
Those fields would be the basis for the envelope info. (Set a rule on the
button to set field "Subj = field1" (from the table), "Desc = field2", etc.)

If you just want the body to just be = to specified information, you may
need to change views for this. The HTML view that is created automatically
takes a 'snapshot' of the current view. Or, just put these fields at the top
of the page and the table will show at the bottom

Will this work for you?
 
R

ridawg

Jerry,

Thanks for the info. I think what I need to do is put a button in each table
row like you suggested. Can you elaborate a little bit more on this 'cause
honestly I have no idea what I'm doing! I have created rules before but I
don't understand how to copy the data I need to a set of fields outside of
the table. Basically my form has about 20 fields but I only need 6 of them in
the email. This is what I would like to do:

Creat an email with:
To = Name
Subject = Call Title
Body = Call Subject, Call Type, System, Priority (possibly use Priority to
set message importance)
I have some experience using CDO to create email messages as well as using
VBA. Not sure if that helps. My company is using Office 2003 as well if that
makes a difference.

Thanks!
 
J

JerryTh [MSFT]

You will need to copy all of the table fields that you want to use, to
non-repeating fields on the form. Remember to set the data type the same (ie;
Dates, etc).
1. Add a button to the Repeating tabkle that will hold your data.
(This can be in a seperate column or added to an existing column)
2. Open the button properties in the Repeating table and select Rules.
3. [Add]
4. Condition will stay blank meaning "do this every time I click the button"
5. [Add Action]
6. Action = "Set a field's value"
7. Field: = the field on the form (not in the table) (ie; "Call Subject"
Click the icon on the right side and select the field
8. Value: = the table field
Click the Function icon, "Insert field or group" and select "Subject"
from the table
9. Repeat 5 - 8 for the Name, Call Title, Type, System and Priority
10. OK out of the dialog

For the E-Mail Submit Adapter
1. Tools / Submitting Forms
2. Check "Enable Submit..."
3. Leave Submit type as E-Mail
4. [Add]
5. Click the Function Button by the Name Field and "Insert field..". Select
the Name field (Not from the table)
6. Click the Function Button by the Subject Field and "Insert field..".
Select the Call Title field (Not from the table)
etc.

Try that and see if it is what you need!
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
Do not send email to this alias. It is for newsgroup only
 

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