내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Macro to change font colors (with exeption)

Avatar

Level 2

Hello.

 

When updating my forms, I usually put all changes in red to ensure we know were to look during review.

I would like to use a macro to remove all these red in regular text boxes, field captions, etc. en replace them with black.

Except for text that contain an url link (They should be blue)

How would you do that ?

I guess, finding all "

<fill>
<color value="255,0,0"/>
</fill>"

and remove them unless when url is present then, replace "255,0,0" by a blue color.

 

Not sure how to do that,

 

Can you help ?

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

Create a text file with following content.

var oNodes = designer.filterNodeTree(xfa.template, "value", "255,0,0");
for (var i = 0; i < oNodes.length; i += 1) {
	oNodes.item(i).value = "0,0,0";
}

Save that file as .js  file (i.e. my Macro.js). 

Create a new folder under the macro folder of you LiveCycle or AEM Forms Designer (i.e. C:\Program Files (x86)\Adobe\Adobe Experience Manager Forms Designer\EN\Macros\MyMacros) and paste you .js file there. 

Open your form in Designer an execute your new macro from [Tools] > [Macros].

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Level 10

Create a text file with following content.

var oNodes = designer.filterNodeTree(xfa.template, "value", "255,0,0");
for (var i = 0; i < oNodes.length; i += 1) {
	oNodes.item(i).value = "0,0,0";
}

Save that file as .js  file (i.e. my Macro.js). 

Create a new folder under the macro folder of you LiveCycle or AEM Forms Designer (i.e. C:\Program Files (x86)\Adobe\Adobe Experience Manager Forms Designer\EN\Macros\MyMacros) and paste you .js file there. 

Open your form in Designer an execute your new macro from [Tools] > [Macros].