Apologies, im not very good at this am I
Sub sendeMail()
Dim olkApp As Object
Dim strSubject As String
Dim strTo As String
Dim strBody As String
Dim strBody2 As String
Dim strBody3 As String
Dim strBody4 As String
Dim strBody5 As String
Dim strBody6 As String
Dim strAtt As String
Dim Mail As String
Dim mail2 As String
Dim mail3 As String
Dim mail4 As String
Dim Mail5 As String
Dim mail6 As String
Dim str1 As String
Dim str2 As String
Dim str3 As String
Dim str4 As String
Dim str5 As String
Dim str6 As String
Dim test1 As DataObject
Set dFname = New DataObject
Dim name1 As String
Dim name2 As String
Dim name3 As String
Dim name4 As String
Dim name5 As String
Dim name6 As String
Dim TextToFind As String, TheContent As String
Dim rng As Word.Range
Dim host As String
strAtt = ActiveDocument.FullName
Mail = ActiveDocument.Shapes("Text Box 1").TextFrame.TextRange.Text ' setting the email addresses from what is input in the text box's
mail2 = ActiveDocument.Shapes("Text Box 2").TextFrame.TextRange.Text
mail3 = ActiveDocument.Shapes("Text Box 3").TextFrame.TextRange.Text
mail4 = ActiveDocument.Shapes("Text Box 4").TextFrame.TextRange.Text
Mail5 = ActiveDocument.Shapes("Text Box 5").TextFrame.TextRange.Text
mail6 = ActiveDocument.Shapes("Text Box 6").TextFrame.TextRange.Text
name1 = Trim(ActiveDocument.Shapes("Text Box 7").TextFrame.TextRange.Text)
name2 = ActiveDocument.Shapes("Text Box 8").TextFrame.TextRange.Text
name3 = ActiveDocument.Shapes("Text Box 9").TextFrame.TextRange.Text
name4 = ActiveDocument.Shapes("Text Box 10").TextFrame.TextRange.Text
name5 = ActiveDocument.Shapes("Text Box 11").TextFrame.TextRange.Text
name6 = ActiveDocument.Shapes("Text Box 12").TextFrame.TextRange.Text
host = ActiveDocument.Shapes("Text Box 13").TextFrame.TextRange.Text
str1 = Mail
str2 = mail2
str3 = mail3
str4 = mail4
str5 = Mail5
str6 = mail6
Selection.Find.ClearFormatting
With Selection.Find
.Text = "ACTION " & name1
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Do While Selection.Find.Execute
Selection.StartOf Unit:=wdParagraph
Selection.MoveEnd Unit:=wdParagraph
sBigString = sBigString + Selection.Text
Selection.MoveStart Unit:=wdParagraph
Loop
'Documents.Add DocumentType:=wdNewBlankDocument
'Selection.InsertAfter (sBigString)
strSubject = "Today's Meeting Minutes"
strBody = "Dear " & name1 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
strBody2 = "Dear " & name2 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
strBody3 = "Dear " & name3 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
strBody4 = "Dear " & name4 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
strBody5 = "Dear " & name5 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
strBody6 = "Dear " & name6 & "Please see attached File for the minutes of todays meeting." & vbNewLine & vbNewLine & "Please see below for a list of actions taken from the meeting:" & vbNewLine & vbNewLine & sBigString & vbNewLine & vbNewLine & vbNewLine & "Kind Regards" & vbNewLine & vbNewLine & host
If ActiveDocument.FullName = "" Then
MsgBox "activedocument not saved, exiting"
Exit Sub
Else
If ActiveDocument.Saved = False Then
If MsgBox("Activedocument NOT saved, Proceed?", vbYesNo, "Error") <> vbYes Then Exit Sub
End If
End If
On Error GoTo ErrorHandler
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str1
.Subject = strSubject
.Body = strBody
.Attachments.Add strAtt
.Send
End With
Set olkApp = Nothing
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str2
.Subject = strSubject
.Body = strBody2
.Attachments.Add strAtt
.Send
On Error GoTo ErrorHandler
End With
Set olkApp = Nothing
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str3
.Subject = strSubject
.Body = strBody3
.Attachments.Add strAtt
.Send
End With
Set olkApp = Nothing
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str4
.Subject = strSubject
.Body = strBody4
.Attachments.Add strAtt
.Send
On Error GoTo ErrorHandler
End With
Set olkApp = Nothing
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str5
.Subject = strSubject
.Body = strBody5
.Attachments.Add strAtt
.Send
On Error GoTo ErrorHandler
End With
Set olkApp = Nothing
Set olkApp = CreateObject("outlook.application")
With olkApp.CreateItem(0)
.To = str6
.Subject = strSubject
.Body = strBody6
.Attachments.Add strAtt
.Send
On Error GoTo ErrorHandler
End With
Set olkApp = Nothing
ErrorHandler:
End Sub