Hello guys,

I would like to open most recent pdf in the folder as folderPath. But unfortunately the pdf file is opened in excel. Is it possible to open it automatically in Adobe Acrobat XI Pro ?

Thank you for answer

Sub openLastModified()

Dim folderPath As String, tableName As String, latestTblName As String
Dim latestModified As Date, modifiedDate As Date

folderPath = "C:\FASE\3000_ Receiv.....\"

tableName = Dir(folderPath & "*.pdf")

Do While tableName <> vbNullString
modifiedDate = FileDateTime(folderPath & tableName)
If latestModified < modifiedDate Then
latestModified = modifiedDate
latestTblName = tableName
End If
tableName = Dir()
Loop

Workbooks.Open folderPath & latestTblName

End Sub