Hi,
Ive got a macro that will capture information from two cells into the subject line of an email using the code below. What I want to do now is add a bit more code that will insert a recipients email address but not send the email.
Can someone provide the line I need and tell me where to insert please?
This is my first post and I am very new at this. The code I have so far was provided so please be patient with me
Many thanks
Tim
Code starts here
Code
Sub Mail_workbook_1()
'Working in 97-2010
Dim wb As Workbook
Dim I As Long
Dim strSubject As String
strSubject = Worksheets("Request Form").Range("D6") & " - " & Worksheets("Request Form").Range("H6")
Set wb = ActiveWorkbook
If Val(Application.Version) >= 12 Then
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file, there will be no VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
For I = 1 To 3
wb.SendMail "", _
Subject:=strSubject
If Err.Number = 0 Then Exit For
Next I
On Error GoTo 0
End Sub
Display More