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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2k3 web form submit button

Status
Not open for further replies.

wigertd

MIS
Jul 20, 2006
6
US
Hi… I hope someone can help me.

I want to create a web form with Word 2k3 that can be filled out on-line, and then submitted as an e-mail attachment, or in the e-mail body (or both). But, I am having trouble with the submit button. When I click on submit, I get the notification that my client is going to send an e-mail, and I click ‘Yes’ to allow it. I can live with that, although I would prefer a new e-mail would actually open, so the sender could review and edit prior to sending. (With Get as the Method, instead of Post, I have been able to get a blank e-mail created, with the correct address ready to send. But again, it’s blank.)

Here are my submit button properties settings now:

(Name): HTMLSubmit1
Action: "mailto:someone@somewhere.com"
Caption: Submit Form
Encoding: text/plain
Height: 22.5
HTMLName: Remember_when_our_grandparents6.htm
Method: Post
Width: 57

This comes accross in the subject line:
Form posted from Microsoft Internet Explorer.

This comes across in the body:
Remember_when_our_grandparents6.htm=Submit Form

Still no form as an attachment, or data from the form in the e-mail body. Just a blank form.

The VBA Help says something about needing a file to point to when the submit button is clicked on.

I perform basic maintenance on our low-budget website, and am trying to create a simple ‘test’ a user can fill out on-line, click submit (which will send an e-mail to me with the completed form)… all without having to hire outside help. But, since I am not fluent in VB or VBA, I’m finding this more difficult than it probably actually is. I'm afraid my learning curve is slower than my need on this one.

Any help is greatly appreciated!!!!!!!!!!!!
Wigertd
 
wigertd,
A couple of thoughts.[ol]
[li]Are the data fields part of the same [tt]Form[/tt] that the [tt]Submit[/tt] button belongs to?[/li]
[li]Do the above fields all have [tt]HTMLName[/tt]s assigned to them?[/li][/ol]

CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
CautionMP, thanks for responding!

1. Yes, they're part of the same form.
2. I'm not sure I understand your question. The HTMLNmae field is Remember_when_our_grandparents6.htm. Maybe I am missing something.

The textarea fields have names assigned. Grammer1 and Grammer2. I only have these two fields so far. When done, there will be many others. Do I need to name them Grammer1.htm, etc?

Thanks again.
Wigertd

 
wigertd,
I played around with Word as a HTML editor to try and figure out what was happening, and Word is a little strange.
Here is what Word generated for the form tag:
Code:
...
<form action="mailto:someone@somewhere.com" method=Post enctype="text/plain">
<p class=MsoNormal><INPUT TYPE="TEXT"></p>
<p class=MsoNormal><INPUT TYPE="TEXT"></p>
<p class=MsoNormal><INPUT TYPE="SUBMIT" ACTION="mailto:someone@somewhere.com" VALUE="Submit Form" ENCTYPE="text/plain" METHOD="Post" NAME="Remember_when_our_grandparents6"></p>
</form>...

Here is what I would have expected to see:
Code:
...
<form action="mailto:someone@somewhere.com" method=Post enctype="text/plain">
<INPUT TYPE="TEXT" NAME="Grammer1"><br>
<INPUT TYPE="TEXT" NAME="Grammer2"><br>
<INPUT TYPE="SUBMIT" VALUE="Submit Form">
</form>...

When I run this I get an email with the following body (test1 & test2 were supplied to the form):
[tt]Grammer1=test1
Grammer2=test2[/tt]

I can't figure out how to get Word to do the 'right thing', you may be stuck doing some of the HTML coding by hand (I still do mine in Notepad).

A nother quick hint: You can specify your subject by using [tt]ACTION="mailto:someone@somewhere.com?subject=Your Inbound Subject here"[/tt]

Hope this helps,
CMP

[small]For the best results do what I'm thinking, not what I'm saying.[/small]
(GMT-07:00) Mountain Time (US & Canada)
 
CMP, I appreciate all the trouble you went through.

I'll play around with the HTML. I feel more comfortable with that. I just assumed it was a VBA problem. That'll teach me.

If I get it to work, I'll follow-up this with the details.

Thanks again!
Wigertd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top