Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Change a Fillable Field to Read Only Using VBA

Avatar

Avatar
Level 1
jefff34942432
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile

Avatar
Level 1
jefff34942432
Level 1

Likes

0 likes

Total Posts

2 posts

Correct Reply

0 solutions
View profile
jefff34942432
Level 1

15-07-2020

Hello

 

I have a form that was created in LiveCycle (not by me)

 

The Form is a fillable form that is protected (I cant make changes to the form itself)

 

What i am trying to do is to populate the fillable form fields from Excel or MSAccess using VBA -- this part I have solved - I am able to populate every field that I want to using VBA

 

What I am trying to now do is to Make some of the fields that I just populated as Read Only - so that when I save the file and send it to someone else - the fields that I just filled in will not be editable

 

I have tried this code

jso.getfields("LAB1070E[0].Page1[0].txtF_3_EmployNameAdd[0].ReadOnly = True

 

The code does not produce any errors - but it does not actually make the field Read Onl

 

I have Tried

jso.xfa.resolvenode("forms.LAB1070.Page1.txtF_3_EmployNameAdd").rawValue = "1234"

 

This works to change the value - and seems to be the proper syntax for working with LiveCycle built forms - my questions is:

 

It is even possible to change the Read Only status of a Form Field using VBA so that when you save the PDF the field will actually be Read Only

 

What is the proper syntax to use

 

Any assistance or thoughts on this would be greatly appreciated 

 

Thanks

 

Jeff

Read Only VBA

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Affirm 100
Employee
Kosta_Prokopiu1
Employee

Likes

165 likes

Total Posts

369 posts

Correct Reply

107 solutions
Top badges earned
Affirm 100
Validate 1
Establish
Give Back 5
Give Back 3
View profile

Avatar
Affirm 100
Employee
Kosta_Prokopiu1
Employee

Likes

165 likes

Total Posts

369 posts

Correct Reply

107 solutions
Top badges earned
Affirm 100
Validate 1
Establish
Give Back 5
Give Back 3
View profile
Kosta_Prokopiu1
Employee

15-07-2020

Hi,

 

I have never used VBA to set XFA form fields from a VB script.

But this would be the syntax to change the access to that field - maybe that works via this interface as well:

jso.xfa.resolvenode("forms.LAB1070.Page1.txtF_3_EmployNameAdd").access = "readOnly"

 

for more access options (should this work) see here: https://help.adobe.com/de_DE/livecycle/11.0/DesignerScriptingRef/WS92d06802c76abadb-3e14850712a151d2...

 

Kosta