Run Time Error

MARKEGANDERSON

Active Member
Joined
Apr 7, 2007
Messages
264
Hello Guys trying to activate Adobe Acrobat DC but keep getting the attached error.

It works well with Foxit...

can anyone assist?
 

Attachments

  • 50FE9C46-60FB-4E3D-9726-E7A0AF1F7425.jpeg
    50FE9C46-60FB-4E3D-9726-E7A0AF1F7425.jpeg
    197.5 KB · Views: 41

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Try...

VBA Code:
AppActivate "Adobe Acrobat Reader DC"

Hope this helps!
 
Upvote 0
Thanks for the feedback but that did not work.

No issues with:
AppActivate "Foxit Reader"

Just seems strange why it will not activate Adobe
 
Upvote 0
When you have the application open, what is the caption of the application's title bar?
 
Upvote 0
Domenic you are a genius, I'm a retard LOL

AppActivate "Adobe Acrobat Pro DC" worked like a charm!!

Thanks a bunch!
 
Upvote 0
Thanks again Domenic. I have one more issue with different set of codes.

So in this one it works well with Foxit, fill out all the fields then save as file,then to the next candidate.
whenever I change the default PDF reader to Adobe, it fill outs the fields for the 1st candidate, then does not reset for the 2nd candidate but continues down the sheet versus starting back on top.

Can I send you the sheet or post the codes?
 
Upvote 0
Domenic - See below please

Sub PDFTemplate()
Dim PDFFldr As FileDialog
Set PDFFldr = Application.FileDialog(msoFileDialogFilePicker)
With PDFFldr
.Title = "Select PDF file to attach"
.Filters.Add "PDF Type Files", "*.pdf", 1
If .Show <> -1 Then GoTo NoSelection
Sheet1.Range("E136").Value = .SelectedItems(1)
End With
NoSelection:
End Sub
Sub SavePDFFolder()
Dim PDFFldr As FileDialog
Set PDFFldr = Application.FileDialog(msoFileDialogFolderPicker)
With PDFFldr
.Title = "Select a Folder"
If .Show <> -1 Then GoTo NoSel:
Sheet1.Range("E142").Value = .SelectedItems(1)
End With
NoSel:
End Sub

Sub CreatePDFForms()
Dim PDFTemplateFile, NewPDFName, SavePDFFolder, LastName As String
Dim FirstName As String, MiddleName As String
Dim CandidateRow, LastRow As Long
With Sheet1
LastRow = .Range("D9999").End(xlUp).Row 'Last Row
PDFTemplateFile = .Range("E136").Value 'Template File Name
SavePDFFolder = .Range("E142").Value 'Save PDF Folder
ThisWorkbook.FollowHyperlink PDFTemplateFile
Application.Wait Now + 0.00005


For CandidateRow = 2 To 3 'LastRow

'Clear Form
'Application.SendKeys "%"
'Application.Wait Now + 0.00001
'Application.SendKeys "m"
'Application.Wait Now + 0.00001
'Application.SendKeys "f"
'Application.Wait Now + 0.00001

LastName = .Range("D" & CandidateRow).Value 'Last Name
FirstName = .Range("E" & CandidateRow).Value 'First Name
MiddleName = .Range("F" & CandidateRow).Value 'Middle Name

Application.SendKeys "{Tab}", True
Application.SendKeys "{Enter}", True
Application.SendKeys "{Tab}", True
Application.Wait Now + 0.00001

Application.SendKeys LastName, True
Application.Wait Now + 0.00001
Application.SendKeys "{Tab}", True
Application.SendKeys Range("E" & CandidateRow).Value, True 'First Name
Application.Wait Now + 0.00001

Application.SendKeys "{Tab}", True
Application.Wait Now + 0.00001
Application.SendKeys "{Delete}", True
Application.SendKeys Range("F" & CandidateRow).Value, True 'Middle Name
Application.Wait Now + 0.00001

Application.SendKeys "{Tab}", True
Application.Wait Now + 0.00001
Application.SendKeys "{Delete}", True
Application.SendKeys Range("G" & CandidateRow).Value, True 'Cadency
Application.Wait Now + 0.00001

Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True
Application.SendKeys "{Tab}", True

Application.SendKeys Range("H" & CandidateRow).Value, True 'SSN
Application.Wait Now + 0.00001

Application.SendKeys "{Tab}", True
Application.Wait Now + 0.00001
Application.SendKeys "^(a)", True
Application.Wait Now + 0.00001
Application.SendKeys "{Delete}", True
Application.SendKeys Range("I" & CandidateRow).Value, True 'DOB
Application.Wait Now + 0.00001
Application.SendKeys "{Tab}", True

Application.SendKeys "^+(s)", True
Application.Wait Now + 0.00004
If Dir(SavePDFFolder & "\" & LastName & "," & " " & FirstName & " " & MiddleName & ".pdf") <> Empty Then Kill (SavePDFFolder & "\" & LastName & "," & " " & FirstName & " " & MiddleName & ".pdf")
Application.SendKeys SavePDFFolder & "\" & LastName & "," & " " & FirstName & " " & MiddleName & ".pdf"
Application.Wait Now + 0.00002
Application.SendKeys "%(s)", True
Application.Wait Now + 0.00004
Next CandidateRow

Application.SendKeys "^(q)", True
Application.SendKeys "^{numlock}%s", True


End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,279
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top