Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
moving text from a Word form into a Word template
We use a MS Word form to collect information from our internal customers.
They complete the form then email it to us. We use that data to create contract documents by cutting and pasting (or worse, re-typing) the information into various contract templates. There are about 20 data boxes on the form, and most are required information for to have to complete the contracts. We have a number of contract templates and select the appropriate one based on the situation. It seems like there should be an easier way of moving data from one document to another. Is there an analogous way to mail merge to pull data from the completed form into a selected template? Any ideas or suggestions appreciated. Cliffordjf |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
moving text from a Word form into a Word template
How proficient are you at VBA coding?
It is not too difficult to set up the templates with DOCVARIABLE fields at the locations where you want the information to appear and then have an autonew macro in the template that opens a dialog box which will allow you to select the form provided by your internal cusotmer and then parse that form for the relevant data with which it would create variables in the document created from the template and then update the fields in the document so that the data appears in the DOCVARIABLE fields. Assuming that you use the same name for the document variables as the bookmark names assigned to each of the FormFields in the internal customer form, the code (untested) for the autonew macro would be: Dim fd As FileDialog Dim Source As Document Dim Target As Document Dim i As Long Set Target = ActiveDocument Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd .AllowMultiSelect = False .Title = "Select Form Document that you want to use" .InitialFileName = "" If .Show = -1 Then Set Source = Documents.Open(.SelectedItems(1)) Else MsgBox "You must select a Form Document." Exit Sub End If End With Set fd = Nothing With Source For i = 1 To .FormFields.Count Target.Variables(.FormFields(1).Name).Value = .FormFields(1).result Next i End With Target.Range.Fields.Update If that is beyond you and you would like to engage me to develop the application for you, email me at -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "cliffordjf" wrote in message ... We use a MS Word form to collect information from our internal customers. They complete the form then email it to us. We use that data to create contract documents by cutting and pasting (or worse, re-typing) the information into various contract templates. There are about 20 data boxes on the form, and most are required information for to have to complete the contracts. We have a number of contract templates and select the appropriate one based on the situation. It seems like there should be an easier way of moving data from one document to another. Is there an analogous way to mail merge to pull data from the completed form into a selected template? Any ideas or suggestions appreciated. Cliffordjf |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
moving text from MS Word form into a Word template | Microsoft Word Help | |||
Preventing text from moving when my form is filled in Word 2003? | Microsoft Word Help | |||
made a word template, how do I keep text from moving? | Microsoft Word Help | |||
Add form fields to existing text w/o moving the text | Page Layout | |||
Word - Text Form Field Moving | Microsoft Word Help |