Subject: Send mail in base to values in excel file
this code will ask the user the select the excel fileand will enter to sendto field the value from A1 field in excel :
Dim xlSheet1 As Variant
Dim xlApp As Variant
Dim wrkBook As Variant
Dim tplExcel As Variant
Dim nameExcel As String
Dim nameSheet As String
Dim v As Variant,col As String
v=workspace.openfiledialog (False, "Please select a the excel file")
If Isempty(v) Then Exit Sub
nameExcel=v(0)
nameSheet =uidoc.FieldGetText("Sheet1")
Set xlApp = CreateObject("Excel.Application")
If xlApp Is Nothing Then
Exit Sub
End If
Set wrkbook = xlApp.Workbooks 'wrkbook to Workbook
wrkbook.open nameExcel
Set xlSheet1 = xlApp.Worksheets(nameSheet)
xlSheet1.activate