SmithcZA,
Since nobody has input I will chime in.
I have never had muck luck with Outlook forms (too much work, too little return) so here is a solution based around an HTML form that you can email. The functionality is all in Outlook and does three things:[ol]
[li]Create a new Email.[/li]
[li]Set the [tt]HTMLBody[/tt] of the new email by grabbing the text in a 'template'.[/li]
[li]Sends the email.[/li][/ol]
Once the recipient responds, the email response can then be parsed into a CSV/Excel format (see note below).
There are two pieces, the routines that you will need in Outlook, and the HTML template.
Here are the routines for Outlook:
Code:
Sub NewHTMLMessage()
Dim MyMail As MailItem
Set MyMail = CreateItem(olMailItem)
With MyMail
.HTMLBody = HTMLFormData
.Subject = "Your outbound subject here"
.To = "Someone@Somewhere.com"
'Saving the message in Development, change to Send in production
.Save
End With
Set MyMail = Nothing
End Sub
Function HTMLFormData() As String
Dim intFile As Integer
Dim strTemplateName As String
intFile = FreeFile
'This is the loaction of the template file
strTemplateName = "C:\FormTemplate.htm"
Open strTemplateName For Input As #intFile
HTMLFormData = Input(LOF(intFile), #intFile)
Close #intFile
End Function
Here is the HTML template, just copy and paste the follwing text into Notepad and save as [tt]C:\FormTemplate.htm[/tt]:
Code:
<HTML>
<BODY>
<FORM method="post" action="mailto:YourName@YourCompany.com?subject=Your Inbound Subject here" enctype="text/plain">
<INPUT TYPE="hidden" NAME="internalsubject" VALUE="hidden submit"><P>
Question 1:<P>
<INPUT TYPE=Radio Name=Question1 Value=1>One
<INPUT TYPE=Radio Name=Question1 Value=2>Two
<INPUT TYPE=Radio Name=Question1 Value=3>Three
<INPUT TYPE=Radio Name=Question1 Value=4>Four
<INPUT TYPE=Radio Name=Question1 Value=5>Five<P>
Question 2:<P>
<INPUT TYPE=Radio Name=Question2 Value=1>One
<INPUT TYPE=Radio Name=Question2 Value=2>Two
<INPUT TYPE=Radio Name=Question2 Value=3>Three
<INPUT TYPE=Radio Name=Question2 Value=4>Four
<INPUT TYPE=Radio Name=Question2 Value=5>Five<P>
(rest of form content)<P>
<INPUT Type=Submit VALUE=Respond>
</FORM>
</BODY>
</HTML>
A couple of notes:[ul]
[li][tt]C:\FormTemplate.htm[/tt] can be created and edited in your favorite HTML editor (Notepad, Front Page, Word, Excel...)[/li]
[li]The HTML form in the message will not work right until sent (I had to send it to myself to test).[/li]
[li]The recipient of the message will probably get a warning when they click 'Response'. You might want to put a heads up in your HTML template letting them know this is ok.[/li][/ul]
If you like this approach I can get you the code to cycle through an Outlook Inbox and convert the responses to Excel.
Hope this helps,
CMP
(GMT-07:00) Mountain Time (US & Canada)