View Single Post
 
Old 05-17-2021, 04:06 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,144
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

Do you mean like

Code:
Private Sub UserForm_Initialize()
Dim lngFld As Long
    With ActiveDocument.MailMerge.DataSource
        ListBox1.Clear
        For lngFld = 1 To .FieldNames.Count
            ListBox1.AddItem .FieldNames(lngFld)
        Next
    End With
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote