Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stumped on how to check or uncheck a check box in pdf form through vba

Status
Not open for further replies.

kavya

Programmer
Feb 21, 2001
83
US
Using VBA in MS Access trying to prefill a pdf form...

I have the following code to prefill if it is text box, stuck on how to check or uncheck a check box based on a field value.


Dim AcroApp As Acrobat.CAcroApp
Dim pdDoc As Acrobat.CAcroPDDoc
Dim fcount As Long
Dim sFieldName As String
Dim Field As AFORMAUTLib.Field
Dim Fields As AFORMAUTLib.Fields
Dim AcroForm As AFORMAUTLib.AFormApp
Dim jso As Object
dim x as object
Dim answer As Integer


If (Dir("c:\namus_reader.pdf") = "") Then
MsgBox "Questionnaire files not found "
Exit Sub
End If


Set pdDoc = CreateObject("AcroExch.PDDoc")

If pdDoc.Open("c:\namus_reader.pdf") Then


Set X = jso.getfield("ch_agenow")
X.Value = yrsnow


Set X = jso.getfield("ch_ncicnumber")
X.Value = NCICnumber
 


You might want to post in forum705.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Try setting the value to 1 / 0 or true / false

Rgds, Geoff

We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.

Please read FAQ222-2244 before you ask a question
 
Setting the value to 'Yes' or 'No' worked. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top