Is there a way to merge the below two codes? They are being written in excel so after I copy and paste excel data into word, I would like to save the word document but I dont want to have to manually click the word document to make it the activeworksheet. So I'm thinking if there is a way to merge these two codes, that would work best. Is there a way?
[vba]Sub PasteToWord()
Dim AppWord As Word.Application
Set AppWord = CreateObject("Word.Application")
AppWord.Visible = True
' Change the range to suit your needs. See the How to Use for this code
Sheets("Sheet1").Range("A3:H28").Copy
AppWord.Documents.Add
AppWord.Selection.Paste
Application.CutCopyMode = False
Set AppWord = Nothing
ActiveWindow.SmallScroll Up:=75
End Sub
Sub Test()
ActiveDocument.SaveAs2 "C:\Users\klartigue\Desktop\Test.pdf", 17
End Sub[/vba]