Hi,
I am trying the automatic processing below.
Before:
After:
Adding borders succeeded, but I can't add colors to AFrames.
My script is below.
var doc = app.ActiveDoc; if (doc.ObjectValid() == true) { var colorFormat = doc.GetNamedObject(Constants.FO_Color, "Red"); var colorProps = colorFormat.GetProps(); var flow = doc.MainFlowInDoc; var textFrame = flow.FirstTextFrameInFlow; while (textFrame.ObjectValid()) { var aFrame = textFrame.FirstAFrame; while (aFrame.ObjectValid()) { aFrame.Pen = 0; //=> works! aFrame.Color.SetProps(colorProps); //=> doesn't work... aFrame.SetProps(colorProps); //=> doesn't work... aFrame.Color.Name = "Red"; //=> doesn't work... aFrame = aFrame.NextAFrame; } textFrame = textFrame.NextTextFrameInFlow; } }
Please teach me how to handle it.
Thanks,
Koji Koike
Hi Koji,
just try this:
aFrame.Color = colorFormat;
a.Frame.Color is a colorobject. So you have to assign a colorobject also.
Hi Klaus,
Thank you very much for your quick answer.
I will reread references to understand objects in FrameMaker more.
Best regards,