View Full Version : Set focus on document from Userform

12-14-2004, 01:17 PM
With reference to my MergeField Select KB entry, I would like it to "Set Focus" to the document after a mergefield is added. The code to add the field is :

Private Sub ListBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
'Add listbox item to document
ActiveDocument.Fields.Add Range:=Selection.Range, Type:=wdFieldMergeField _
, Text:=ListBox1
End Sub

Jacob Hilderbrand
12-18-2004, 05:07 AM
Can you just unload/hide the User Form or are you trying to do something else?