Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Why doesn't Word show dropdown box results in form when emailed?
I have designed a form for salespeople which is simple to use and want them
to be able to click on 'SEND TO' (via Outlook) from Word (2003)so that they can send the results from there rather than attaching as a Word document. However, if they do this the answers they've selected in the drop down boxes do not show. If they attach as a Word doc it is perfect. Would be grateful if anyone knows why or how to fix.. |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Why doesn't Word show dropdown box results in form when emailed?
The formatting requirements of HTML e-mail and word document are different;
however if it is only the results of the form fields that you are interested in, it is simple enough to e-mail those in the form of (say) a comma delimited file. The following macro will extract the content of each field (check boxes copy as 0 or 1) and write it into a throw away Word document as a comma delimited file. When all the fields are extracted, the macro then e-mails the resulting comma delimited file to the e-mail address indicated. You will need to add the Microsoft Outlook Object Library to vba Tools References for this to work. I have set the macro to display the message. If you want to simply send it, change the line .Display to .Send Sub ExtractData() Dim oFld As FormFields Dim sText As String Dim i As Long Dim bStarted As Boolean Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem Dim dDataDoc As Word.Document Dim dSource As Word.Document Dim objDoc As Word.Document Set dSource = ActiveDocument Set dDataDoc = Documents.Add Set oFld = dSource.FormFields Application.ScreenUpdating = False For i = 1 To oFld.Count sText = oFld(i).Result dDataDoc.Activate If i 1 Then Selection.TypeText "," Selection.TypeText sText If i = oFld.Count Then Selection.TypeParagraph dSource.Activate Next i dDataDoc.Range.Copy 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") 'Outlook wasn't running, start it from code If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") bStarted = True End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) Set objDoc = oItem.GetInspector.WordEditor With oItem .To = " .Subject = "Data Return" objDoc.Range.Paste .Display End With 'Clean up Application.ScreenUpdating = True Set oItem = Nothing Set oOutlookApp = Nothing End Sub http://www.gmayor.com/installing_macro.htm Stella wrote: I have designed a form for salespeople which is simple to use and want them to be able to click on 'SEND TO' (via Outlook) from Word (2003)so that they can send the results from there rather than attaching as a Word document. However, if they do this the answers they've selected in the drop down boxes do not show. If they attach as a Word doc it is perfect. Would be grateful if anyone knows why or how to fix.. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why does Word 2007 NOT show Track Changes in emailed documents | Microsoft Word Help | |||
How do I show results of a calculated field on a protected form? | New Users | |||
inserting text from the results of a dropdown box | Mailmerge | |||
How do I get Word to open so that fields show results, not code? | Microsoft Word Help | |||
clipart doesn't show up in results box - only icon to click on | Microsoft Word Help |