Although you use With ... End With, you forget to refer to that object using a dot before .Range
Private Sub Workbook_Open()
for j=1 to 2
with getobject("C:\Folder\subfolder\book" & j & ".xls")
.PrintOut , 3-j, -1
.Close 0
end with
with getobject("C:\Folder\subfolder\book" & j+2 & ".xls")
with .sheets(1).PageSetup
.PrintArea = choose(j,"A38:Q75","A40:P78")
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
.sheets(1).PrintOut , 1, -1
.Close 0
end with
With Getobject("C:\Folder\subfolder\doc" & j & ".doc")
.PrintOut
.Close 0
End With
next
End Sub
Or you could use:
Private Sub Workbook_Open()
with createobject("shell.application")
.shellexecute "C:\Folder\subfolder\book1.xls",,,"print",0
.shellexecute "C:\Folder\subfolder\book1.xls",,,"print",0
.shellexecute "C:\Folder\subfolder\book2.xls",,,"print",0
.shellexecute "C:\Folder\subfolder\doc1.doc",,,"print",0
.shellexecute "C:\Folder\subfolder\doc2.doc",,,"print",0
end with
for j=1 to 2
with getobject("C:\Folder\subfolder\book" & j+2 & ".xls")
with .sheets(1).PageSetup
.PrintArea = choose(j,"A38:Q75","A40:P78")
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
.sheets(1).PrintOut , 1, -1
.Close 0
end with
next
End Sub