Hi All,
yesterday I've been helped beautifully and now I'm stuck again...
My code now copies ranges from Excel to Word nicely, but I need to add page breaks. If I just run the code
wdDoc.Range(wdDoc.Content.End - 1).InsertBreak Type:=7
it works, but when added to the existing code below, it doesn't.
Thank you for helping out
yesterday I've been helped beautifully and now I'm stuck again...
My code now copies ranges from Excel to Word nicely, but I need to add page breaks. If I just run the code
wdDoc.Range(wdDoc.Content.End - 1).InsertBreak Type:=7
it works, but when added to the existing code below, it doesn't.
Code:
Sub ExcelToWord()
Dim wdApp As Object
Dim wdDoc As Object
Set wdApp = CreateObject("Word.Application")
Set wdDoc = wdApp.Documents.Add
wdApp.Visible = True
'Page 1 (Picture)
ThisWorkbook.Sheets("Graphs").Range("A80:P116").Copy
wdApp.Selection.PasteSpecial Link:=False, DataType:=9, _
Placement:=wdInLine, DisplayAsIcon:=False
wdApp.Selection.Characters.Last.Select
wdDoc.Range(wdDoc.Content.End - 1).InsertBreak Type:=7
Application.ScreenUpdating = True
Application.DisplayAlerts = True
End Sub
Thank you for helping out