Вот мой код:
Sub Password1()
'Loop through all files in a folder
Dim fileName As Variant
fileName = Dir("C:\State_K-1_Info\Password\*.pdf")
While fileName <> ""
'Insert the actions to be performed on each file
Application.SendKeys "{Tab}", True
Application.SendKeys "^(s)", True
Application.SendKeys "%{F4}", True
'Set the fileName to the next file
fileName = Dir
Wend
End Sub
Я предполагаю, что мне нужно какое-то утверждение, которое открывает pdf после строки Пока, но все, что я пробовал, работает.