Hi There
I have to export certain columns from an excel sheet to a word document.
Problem:
ActiveSheet.Range("B:B , D").Copy does not copy only Column B and D but also every column in between (in test document column c also gets pasted).
How do I get rid of this? I only want Column B and D, nothing else.
Thank you for your help in advance!
Greetz
testsheet.xlsm
Sub export_excel_to_word()
Set obj = CreateObject("Word.Application")
obj.Visible = True
Set newObj = obj.Documents.Add
ActiveSheet.Range("B:B, D:D").Copy
newObj.Range.Paste
Application.CutCopyMode = False
obj.Activate
End Sub