Hi
I have a problem with below code. As you see it takes only 1 rows but I would like to add range to this code as it is below. It doesn't work but I hope to find support here.
I paste only part of my code because I think that there is a mistake in this part.
Thank you
I have a problem with below code. As you see it takes only 1 rows but I would like to add range to this code as it is below. It doesn't work but I hope to find support here.
I paste only part of my code because I think that there is a mistake in this part.
Thank you
Code:
Set wApp = New Word.ApplicationwApp.Visible = False
With ActiveWorkbook.Sheets("List")
For lRow = 3 To .Range("C" & .Rows.Count).End(xlUp).Row
NAME = .Cells(lRow, "C")
ADDRESS = getAddress(lRow)
ADDRESS2 = getAddress2(lRow)
ID = .Cells(lRow, "B")
Title = .Cells(lRow, "G")
NAME = .Cells(lRow, "H")
Sum = .Cells(lRow, "I")
Sum2 = .Cells(lRow, "J")
Date2 = .Cells(lRow, "K")
[B]test = .Range("W3:W5")
[/B]
exportToWord1 ID, NAME, ADDRESS, ADDRESS2, Title, NAME, Suml, Sum2, Date2, test, FPATH
Next lRow
End With
wApp.Quit