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

Changing Font size and type face for all field??

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

13-05-2015

Because copy and paste bring the font size and type with it I want to create a  script that change it

I tried to make happen at the "exit" function of the the field as follow :

form1.TestPage.Subform1.TextField1.font.size = "10pt";

form1.TestPage.Subform1.TextField1.font.typeface = "Myriad Pro";

I also tried a button that find all field by modifying a script that I found on line but it doesn't work for me:

function ProcessTextEdit(oField)

{

}

function ProcessAllFields(oNode)

{

  if (oNode.className == "subform" )

  {

  // Look for child fields.

  for (var i = 0; i < oNode.nodes.length; i++)

  {

  var oChildNode = oNode.nodes.item(i);

  ProcessAllFields(oChildNode);

  }

  }

  else if (oNode.className == "field")

  {

  switch (oNode.ui.oneOfChild.className)

  {

  case "textEdit":

  if(oNode.parent.className == "Subform")

  {

  form1.TestPage.Subform1.TextField1.font.size = "10pt";

  form1.TestPage.Subform1.TextField1.font.typeface = "Myriad Pro";

  }

  }

  }

}

No luck. Any suggestions?

View Entire Topic

Avatar

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
chrisb29762052
Level 1

Likes

0 likes

Total Posts

25 posts

Correct Reply

2 solutions
Top badges earned
Validate 1
Affirm 1
View profile
chrisb29762052
Level 1

01-06-2015

Unless you can prove me wrong (I would like to be) the script doesn't work against text that has been cut an past from Word.