0

I have written a macro to fill in a Foxit pdf from Excel. The macro populates all info on the first customer row via SendKeys and then loops to the second customer, etc. The code executes without issue. My problem is that when I try to reset the form using shortcut keys that I have assigned, nothing happens. Here is the command:

Application.SendKeys "^+(r)", True 'Reset Form
Application.Wait Now + 0.00006

I need to reset the form as some of the options are checkboxes and some of the fields may be blank. I created a longer wait time to attempt to ensure the command executes. No luck. Similar code for saving the pdf works fine:

Application.SendKeys "^+(s)", True 'Save As
Application.SendKeys "C:\Users\......" & LastName & "\" & FirstName & "_" & "Arrangement" & ".pdf"
Application.Wait Now + 0.00003

Thank you for any help.

  • Unrelated, but the hotkey for SaveAs is actually F12, not Ctrl+S. Are you sure that `+` and the parentheses belong there? – Mathieu Guindon Nov 13 '19 at 18:09
  • The Save As works as Ctrl+Shift+S. – Mark Bailey Nov 13 '19 at 19:30
  • Ctrl+Shift+S does not "SaveAs" in Excel. SaveAs is F12. – Mathieu Guindon Nov 13 '19 at 19:31
  • Correct. Ctrl+Shift+S saves in Foxit PDF. My question pertains to vba commands in Excel to populate a 'live' pdf form. I was hoping someone here would know how to get the command to work. I have assigned the shortcut to Foxit but the vba command doesn't seem to execute. – Mark Bailey Nov 13 '19 at 20:54

0 Answers0