Hi,
Here's hoping someone can help I found the following code that when run, asks you to select a word doc and then imports it into the active workbook, on a new tab which you can name.
This works if your word doc only has 1 page.
My question is, how do I modify this code to copy multiple pages and paste them one after another in excel.
Ideally if the code would read how many pages the word doc has and paste all pages into the same worksheet and adjust the print layout to suit.
Thanks in advance.
Sub Add_Word_Document()
Application.ScreenUpdating = False
Dim MyFile
Sheets.Add After:=Worksheets(Worksheets.Count)
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
End With
MyFile = Application.GetOpenFilename(FileFilter:="Microsoft Word Files (*.doc),*.doc,", FilterIndex:=5, _
Title:="Select the Word File that you would like to add to this file")
ActiveSheet.OLEObjects.Add(Filename:=(MyFile), Link:=False, DisplayAsIcon:=False).Select
MyFile = Left(MyFile, Len(MyFile) - 4)
MyFile = Right(MyFile, Len(MyFile) - Len((Left(MyFile, InStrRev(MyFile, "\")))))
ActiveSheet.Name =InputBox("Enter what you would like to name this sheet.", "Sheet Name", (MyFile))
Range("A1").Select
Application.ScreenUpdating = True
End Sub
Bookmarks