![]() |
|
|
|
#1
|
|||
|
|||
|
Hi, Please can you help me. I am looking for a way to create a form for my staff to be able to fill out when a customer calls up. this would include information like, Customers Name, telephone, Email etc then I would like the form to email the content to my email address? Is this possible? Thanks, |
|
#2
|
||||
|
||||
|
So why not create a suitable form in Outlook and use that? See:
https://support.office.com/en-us/art...ad=US&fromAR=1 http://www.slipstick.com/developer/d...-custom-forms/ http://www.outlook-tips.net/beginner...orms-designer/
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
||||
|
||||
|
This is in fact very easy to achieve. Setup a template featuring a form comprising a two column table with the descriptions in the left column and legacy form fields in the right column. Add an ActiveX button below the table call the e-mail function
Put the button code in the ThisDocument module of the template e.g. Code:
Option Explicit Private Sub CommandButton1_Click() Send_As_HTML_EMail End Sub Code:
Sub Send_As_HTML_EMail()
'Graham Mayor - www.gmayor.com
Dim bStarted As Boolean
Dim olApp As Object
Dim oItem As Object
Dim orng As Range
Dim objdoc As Object
Dim objSel As Selection
On Error Resume Next
Set orng = ActiveDocument.Range
orng.Copy
'Get Outlook if it's running
Set olApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
'Outlook wasn't running, start it from code
Set olApp = CreateObject("Outlook.Application")
bStarted = True
End If
'Create a new mailitem
Set oItem = olApp.CreateItem(0)
With oItem
.BodyFormat = 2
.Display
Set objdoc = .GetInspector.WordEditor
Set objSel = objdoc.Windows(1).Selection
objSel.Paste
.to = "test@mail.com"
.Subject = "The subject"
.Send
End With
If bStarted Then
'If we started Outlook from code, then close it
olApp.Quit
End If
'Clean up
Set oItem = Nothing
Set olApp = Nothing
lbl_Exit:
Exit Sub
End Sub
See http://www.gmayor.com/extract_email_data_addin.htm for a means of processing the data from the messages.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#4
|
||||
|
||||
|
Following on from this thread, I thought it would be amusing to create a template that would do this and which would interface with my extract data add-in. The results may be seen at http://www.gmayor.com/telephone_enquiry_template.htm
If you have any feedback on this template, please make it via my web site and not via the forum.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| designing a custom outlook form - this form is for only sending mails nt collect data | balamuralibm | Outlook | 0 | 05-21-2014 08:08 AM |
| Outlook form - Combo box for deciding who to send form to | Sambora | Outlook | 0 | 02-09-2014 07:20 AM |
| Telephone Hyperlinks? | sunalta | Word | 8 | 12-05-2013 10:05 PM |
| Mail Merge a Protected Form Maintaining Form Fills | t/korean85 | Word | 1 | 04-07-2013 05:34 PM |
Form Fields - Create blank form text field with if statement?
|
LAssist2011 | Word | 5 | 12-14-2011 03:02 PM |