series letter makro 'selecting recievers'
Hello,
i want to finish my little project which creates letters with different texts for every adress listed in the linked excel file.
Now I want a dialog to give the users the ability to select the lines(addresses) themselves from the linked excel file. How can I realize this dialog, familiar to the dialog to select the recievers in standard series letters.
This is my code in a simplified version, because not every function is asked here. Rhe program works perfectly fine, I just need help with the selecting thing.
'### open excel file ###
Dim objXlsAppl As Object 'Excel.Application
Dim objXlsWbk As Object 'Excel.Workbook
Dim objXlsWks As Object 'Excel.Worksheet
Const pfad As String = genpath & "datensaetze.xlsm" 'Path of the xlsm
Set objXlsAppl = CreateObject("excel.application")
Set objXlsWbk = objXlsAppl.Workbooks.Open(Filename:=pfad)
objXlsAppl.Visible = False
Set objXlsWks = objXlsWbk.Worksheets("Datensätze")
'### open dialog ###
'empty, help needed
'### select lines ###
'empty, help needed
'### for selected lines create letter ###
Dim Counter
For Counter = 2 To objXlsWks.UsedRange.Rows.Count 'erste bis letzte Zeile
If haken = True Then
'do letters
Else
'do nothing
End If
Next Counter
End Sub
Thank you for your help
|