I am trying to create a macro that looks at a list of hyperlinks to other excel files in a master excel and pdf's the print area in each file. Another member of this site has helped me to get this far:
Sub Macro1()
'below is the selection
Range("B2:I16").Select
'the below command will save the pdf in its path with the same workbook name
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & "activeworkbook.name" & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
but currently to pdf the actual file i need to have the files open but i want it so that the macro opens the hyperlink pdf's the file closes it and goes onto the next one. What do i need to add?
thankyou
Sub Macro1()
'below is the selection
Range("B2:I16").Select
'the below command will save the pdf in its path with the same workbook name
Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ThisWorkbook.Path & "\" & "activeworkbook.name" & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
End Sub
but currently to pdf the actual file i need to have the files open but i want it so that the macro opens the hyperlink pdf's the file closes it and goes onto the next one. What do i need to add?
thankyou