need help - how to print only certain pages of an embedded doc

carab

New Member
Joined
Jul 2, 2014
Messages
4
Hi everyone - requesting help again because you are all so awesome!

I have the following code that opens an embedded Word doc and prints it (along with the main spreadsheet).
I am trying to figure out how I can tell it to only print pages 1-2 of the Word doc (instead of the whole thing).
I'm guessing it will have to go somewhere in the purple text below, but I don't know what to put.

Would you please help? Thank you!!



Sub PrintAll()

Application.Dialogs(xlDialogPrinterSetup).Show
Sheets("Sheet1").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

Sheets("Sheet1").Select
Call OpenPrintCloseWordDoc

End Sub
Sub OpenPrintCloseWordDoc()

wd = Sheets("Sheet1").Shapes("Object 11").OLEFormat.Verb(Verb:=xlVerbOpen)
Set wdApp = GetObject(, "Word.Application")
Set wdDoc = wdApp.Documents(1)
wdDoc.PrintOut
wdDoc.Close


End Sub

 

Forum statistics

Threads
1,082,548
Messages
5,366,227
Members
400,880
Latest member
dwb

Some videos you may like

This Week's Hot Topics

Top