Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
TextInput type FormFields are lost when doing a Mail Merge, but the
fix that MS has proposed is inadequate for my purposes. http://support.microsoft.com/?kbid=286841 The Word fill-in forms that I have been given - and cannot substantially alter - have blank Word *form* fields - textInput, checkbox, and combobox form fields. Some of these, I want to merge data into, some of these I don't, but instead want them to be left blank for the user to fill in manually *after the merge*. Although checkboxes and comboboxes remain after the merge, any unfilled textInput boxes are not present in the newly created document. The user cannot then tab between the unfilled Word form fields and fill them in. Microsoft's workaround above is about the same as mine - I put the text "ff" in the original doc, and then use vba to replace that with a form field (from Access): ..Application.Selection.Find.ClearFormatting Do While .Application.Selection.Find.Execute _ (FindText:="ff", Wrap:=wdFindContinue, Forward:=True) = True .ActiveDocument.FormFields.Add _ Range:=.Application.Selection.Range, Type:=wdFieldFormTextInput Loop My main problem is that so far, I can only add a field - I cannot then re-create the formatting that the original designers of the Word Document intended (underline, maximum width 2, uppercase, etc). Darryl Kerkeslager Power corrupts. Absolute power corrupts absolutely. Knowledge is power. See www.adcritic.com/interactive/view.php?id=5927 |
#2
![]() |
|||
|
|||
![]()
I can only suggest that you add a little bit more info to each ff tag to
store the formatting information you want and use it after the merge to restore the formatting and so on. e.g. if you want underline, set the field up as ff_underline, parse the info. in your macro and apply the necessary properties. In this case, you might be slightly better off inserting the fields you want by hand, then using another bit of VBA to examine their properties and generate a "field name" that encodes the information you want to transfer. Peter Jamieson "Darryl Kerkeslager" wrote in message ... TextInput type FormFields are lost when doing a Mail Merge, but the fix that MS has proposed is inadequate for my purposes. http://support.microsoft.com/?kbid=286841 The Word fill-in forms that I have been given - and cannot substantially alter - have blank Word *form* fields - textInput, checkbox, and combobox form fields. Some of these, I want to merge data into, some of these I don't, but instead want them to be left blank for the user to fill in manually *after the merge*. Although checkboxes and comboboxes remain after the merge, any unfilled textInput boxes are not present in the newly created document. The user cannot then tab between the unfilled Word form fields and fill them in. Microsoft's workaround above is about the same as mine - I put the text "ff" in the original doc, and then use vba to replace that with a form field (from Access): .Application.Selection.Find.ClearFormatting Do While .Application.Selection.Find.Execute _ (FindText:="ff", Wrap:=wdFindContinue, Forward:=True) = True .ActiveDocument.FormFields.Add _ Range:=.Application.Selection.Range, Type:=wdFieldFormTextInput Loop My main problem is that so far, I can only add a field - I cannot then re-create the formatting that the original designers of the Word Document intended (underline, maximum width 2, uppercase, etc). Darryl Kerkeslager Power corrupts. Absolute power corrupts absolutely. Knowledge is power. See www.adcritic.com/interactive/view.php?id=5927 |
#3
![]() |
|||
|
|||
![]()
"Peter Jamieson" wrote
I can only suggest that you add a little bit more info to each ff tag to store the formatting information you want and use it after the merge to restore the formatting and so on. e.g. if you want underline, set the field up as ff_underline, parse the info. in your macro and apply the necessary properties. Drat! I had hoped for a more elegant solution, but it seems that this problem has no elegant solution, only work-araounds. In this case, you might be slightly better off inserting the fields you want by hand, then using another bit of VBA to examine their properties and generate a "field name" that encodes the information you want to transfer. How do I put the information back in? For instance, I use this to add the form field: ..ActiveDocument.FormFields.Add _ Range:=.Application.Selection.Range, Type:=wdFieldFormTextInput How do I then say, "and make that form field two characters wide"? -- Darryl Kerkeslager Power corrupts. Absolute power corrupts absolutely. Knowledge is power. See www.adcritic.com/interactive/view.php?id=5927 |
#4
![]() |
|||
|
|||
![]()
How do I then say, "and make that form field two characters wide"?
Something like: Dim oFormField as FormField Set oFormField = ActiveDocument.FormFields.Add(Range:=Application.S election.Range, _ Type:=wdFieldFormTextInput) With oFormField.TextInput .Width = 2 End With (You may find some of the relevant properties in the oFormField, and some in oFormField.TextInput). Drat! I had hoped for a more elegant solution, but it seems that this problem has no elegant solution, only work-araounds. Yes, there seem to have been many lost design opportunities in this area. Peter Jamieson "Darryl Kerkeslager" wrote in message ... "Peter Jamieson" wrote I can only suggest that you add a little bit more info to each ff tag to store the formatting information you want and use it after the merge to restore the formatting and so on. e.g. if you want underline, set the field up as ff_underline, parse the info. in your macro and apply the necessary properties. Drat! I had hoped for a more elegant solution, but it seems that this problem has no elegant solution, only work-araounds. In this case, you might be slightly better off inserting the fields you want by hand, then using another bit of VBA to examine their properties and generate a "field name" that encodes the information you want to transfer. How do I put the information back in? For instance, I use this to add the form field: .ActiveDocument.FormFields.Add _ Range:=.Application.Selection.Range, Type:=wdFieldFormTextInput How do I then say, "and make that form field two characters wide"? -- Darryl Kerkeslager Power corrupts. Absolute power corrupts absolutely. Knowledge is power. See www.adcritic.com/interactive/view.php?id=5927 |
#5
![]() |
|||
|
|||
![]()
"Peter Jamieson" wrote
How do I then say, "and make that form field two characters wide"? Something like: Dim oFormField as FormField Set oFormField = ActiveDocument.FormFields.Add(Range:=Application.S election.Range, _ Type:=wdFieldFormTextInput) With oFormField.TextInput .Width = 2 End With (You may find some of the relevant properties in the oFormField, and some in oFormField.TextInput). Thank you for the help. I guess I have a lot of looking at the Word Object Model ahead of me. At least now I know where to start. -- Darryl Kerkeslager Power corrupts. Absolute power corrupts absolutely. Knowledge is power. See www.adcritic.com/interactive/view.php?id=5927 |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
ASK and FILLIN fields in INCLUDETEXT documents do not merge correc | Mailmerge | |||
Proteced Form with Mail Merge Section-Mail Merge is "lost" whe | Microsoft Word Help | |||
Can you create a multi-layered merge where certain merge fields a. | Mailmerge | |||
Email a protected document that contains Text Form Fields | New Users | |||
Using MAILMERGE fields within HYPERLINK fields for Merge to Email | Mailmerge |