Somehow finding difficult to activate Application.SendKeys NewPDFFile, True and cant insert/code the path file name to be use on the save as dialog box.
If .Range("H" & StudentRow).Value = Empty Then
StudentName = .Range("A" & StudentRow).Value 'Student Name
NewPDFFile = ThisWorkbook.Path & "\" & StudentName & "_Enrollment.pdf" 'New File Name
If Dir(NewPDFFile, vbDirectory) <> "" Then Kill (NewPDFFile) 'Deleted File if exists
Application.SendKeys "^+(s)", False
Application.Wait Now + 0.00001
Application.SendKeys NewPDFFile, True
Application.Wait Now + 0.00003
Application.SendKeys "%(s)" 'SAve As
Application.Wait Now + 0.00002
Appreciate any solution. Thanks
If .Range("H" & StudentRow).Value = Empty Then
StudentName = .Range("A" & StudentRow).Value 'Student Name
NewPDFFile = ThisWorkbook.Path & "\" & StudentName & "_Enrollment.pdf" 'New File Name
If Dir(NewPDFFile, vbDirectory) <> "" Then Kill (NewPDFFile) 'Deleted File if exists
Application.SendKeys "^+(s)", False
Application.Wait Now + 0.00001
Application.SendKeys NewPDFFile, True
Application.Wait Now + 0.00003
Application.SendKeys "%(s)" 'SAve As
Application.Wait Now + 0.00002
Appreciate any solution. Thanks