I'm trying to populate a PDF document with information inside of my Excel worksheet, I can populate the PDF with regular words such as names and numbers but I need to populate some checkboxes based on the word "TRUE" inside my Excel sheet, I know that by physically hitting the spacebar it will check the checkbox but when using Application.SendKeys " " nothing happens. Any ideas? The PDF app I'm using is PDF Xchange.
**Check boxes inside the PDF document** When I hit the space bar in my keyboard it checks the box
**Example of Excel sheet I'm using to populate** In this case the word "TRUE" would trigger Application.SendKey (" ")
**Check boxes inside the PDF document** When I hit the space bar in my keyboard it checks the box
**Example of Excel sheet I'm using to populate** In this case the word "TRUE" would trigger Application.SendKey (" ")
VBA Code:
LastRow = .Range("E9999").End(xlUp).Row 'LastRow
For CustRow = 2 To 2 'LastRow
FirstName = .Range("T" & CustRow).Value 'LastName
EplyrName = .Range("B" & CustRow).Value 'Employer Name
Application.SendKeys "{Tab}", True
For Each c In Range("CJ" & CustRow).Cells
If c.Value = "TRUE" Then Application.SendKeys " ", True 'Part iii Check box"
Application.Wait Now + 0.00001
Next c
Application.SendKeys "{Tab}", True
For Each c In Range("CQ" & CustRow).Cells
If c.Value = "TRUE" Then Application.SendKeys " ", True 'Covered all 12 months?"
Application.Wait Now + 0.00001
Next c
Application.SendKeys "{Tab}", True
For Each c In Range("CR" & CustRow).Cells
If c.Value = True Then Application.SendKeys " ", True 'Covered January?"
Application.Wait Now + 0.00001
Next c
Application.SendKeys "{Tab}", True
For Each c In Range("CS" & CustRow).Cells
If c.Value = True Then Application.SendKeys (" "), True 'Covered February?
Application.Wait Now + 0.00001
Next c