Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ms Word Forms : Output fields from form into an email template

Status
Not open for further replies.

EliseFreedman

Programmer
Dec 6, 2002
470
GB
Hi There

We are trying to improve our accident reporting process in the department whereby specific people get an email alert when an incident is submitted via a word document (which already exists)

I was thinking that I could start by creating a form based on the word document. However, i am not sure how to extract certain fields from the word form and put them into an email. Can anyone point me in the right direction: The email should be similar to the following. It would be filled in and sent automatically to a specified distribution list.

Dear All

Please be advised that an accident has occurred:

Date:xxxxxx

Time:xxxxxxx

Location:xxxxxx

Injured Party: xxxxxx

How did accident happen:xxxxxxxx

Regards

Elise
 
You can extract data from multiple forms and display the results in an Access database or Word table. It's neither simple nor straight forward. You'd also need to create a macro that opens each Word file and writes the formfield results into the appropriate database fields or table.

Simpler would be to create an access database. If you're part of a network of some kind give access to the front end to the needed employees and they could all save data to the same backend. Then generate a report at the press of a button that could automatically be emailed out. Probably not simple either unless you can use access sufficiently.
 
All good stuff, but depending on your requirements you could also do:

1. if the entire Word document is what you wish to sent, then just use it as the .Body of the email;

2. if only part is what you wish to send (" i am not sure how to extract certain fields"), then you could do that extraction into a new document, and then send THAT as the .Body of the email.

You can look here for some starter code for working in Outlook.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top