![]() |
|
|||||||
|
|
Thread Tools | Display Modes |
|
#2
|
||||
|
||||
|
Hi! For Problem 1 solution I'd still be grateful, however I've found a solution for Problem 2:
Sub Makró1() Dim oFF1 As FormField Dim oFF2 As FormField Dim oFFx As FormField Dim sFindText As String Selection.HomeKey wdStory sFindText = "f1" Selection.Find.Execute sFindText Do Until Selection.Find.Found = False Set oFF1 = Selection.FormFields.Add(Range:=Selection.Range, Type:=wdFieldFormTextInput) With oFF1 With .TextInput .EditType Type:=wdNumberText, Default:="", Format:="" .Width = 1 End With .Enabled = True End With ActiveDocument.Fields.Update Selection.Find.Execute Loop Selection.HomeKey wdStory sFindText = "f2" Selection.Find.Execute sFindText Do Until Selection.Find.Found = False Set oFF2 = Selection.FormFields.Add(Range:=Selection.Range, Type:=wdFieldFormTextInput) With oFF2 With .TextInput .EditType Type:=wdNumberText, Default:="", Format:="" .Width = 2 End With .Enabled = True End With ActiveDocument.Fields.Update Selection.Find.Execute Loop Selection.HomeKey wdStory sFindText = "fx" Selection.Find.Execute sFindText Do Until Selection.Find.Found = False Set oFFx = Selection.FormFields.Add(Range:=Selection.Range, Type:=wdFieldFormTextInput) With oFFx With .TextInput .EditType Type:=wdRegularText, Default:="", Format:="" End With .Enabled = True End With ActiveDocument.Fields.Update Selection.Find.Execute Loop End Sub |
| Tags |
| form field, mail merge |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Text Fields in Form
|
robstark | Word | 1 | 08-11-2014 11:26 AM |
| Spellcheck macro for protected form fields needed | rharvey1215 | Word | 12 | 03-31-2014 06:47 PM |
Word Form / VBA Solution for Formatted Document
|
elmousa68 | Word VBA | 5 | 10-15-2013 05:10 PM |
Form Fields - Create blank form text field with if statement?
|
LAssist2011 | Word | 5 | 12-14-2011 03:02 PM |
| Insert formatted table into word (mail merge) | manojbmsce | Mail Merge | 0 | 09-25-2008 02:25 AM |