Hi All,
Pretty new to VBA. I have the below coding to sort some data but i would like it to finish it by opening a word doc and executing the mail merge. All the source data has been saved into the word template. Can anyone help.
Thank you in advance
Sub SortMobiles()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Master")
Set Target = ActiveWorkbook.Worksheets("Picksheet")
j = 2
For Each c In Source.Range("O1:O1000")
If c = "Mobile" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
End Sub
Pretty new to VBA. I have the below coding to sort some data but i would like it to finish it by opening a word doc and executing the mail merge. All the source data has been saved into the word template. Can anyone help.
Thank you in advance
Sub SortMobiles()
Dim c As Range
Dim j As Integer
Dim Source As Worksheet
Dim Target As Worksheet
Set Source = ActiveWorkbook.Worksheets("Master")
Set Target = ActiveWorkbook.Worksheets("Picksheet")
j = 2
For Each c In Source.Range("O1:O1000")
If c = "Mobile" Then
Source.Rows(c.Row).Copy Target.Rows(j)
j = j + 1
End If
Next c
End Sub