5 Replies Latest reply on Feb 13, 2008 1:06 PM by (Dave_Saunders)

    How To Affect Text Opacity

      I have searched the archives and looked everywhere I could think of but have not found the answer.
      I have
      Set myText = myTextFrame.Paragraphs.Item(1)
      myText.AppliedFont = myInDesign.Fonts.Item("Times New Roman")
      myText.Justification = idJustification.idCenterAlign
      myText.PointSize = 144
      myText.Opacity = 10 'This line errors out with does not support this

      So how does one affect the opacity of the text?
        • 1. Re: How To Affect Text Opacity
          Level 1
          Are you using CS3? If not, then text can't have opacity different from the text frame holding it.

          Even in CS3, text doesn't have opacity other than by being in a text frame that has opacity set for contents.

          I'd have to dig around the object model to come up with syntax.

          Dave
          • 2. Re: How To Affect Text Opacity
            Level 1
            Yes I am using CS3 (sorry should have mentioned it).

            I tried myTextFrame.Opacity = 10 and that didn’t work either.
            • 3. Re: How To Affect Text Opacity
              Level 1
              I think this should help you:

              Property ContentTransparencySettings As ContentTransparencySetting
              read-only
              Member of InDesign.TextFrame
              Transparency settings for the content of the TextFrame.

              Property BlendingSettings As BlendingSetting
              read-only
              Member of InDesign.ContentTransparencySetting
              Blending mode settings.

              Class BlendingSetting
              Member of InDesign
              Basic object blending settings.

              Property BlendMode As Variant
              Member of InDesign.BlendingSetting
              The blending mode for controlling how the base color interacts with the color of the BlendingSetting. as idBlendMode enumerator or idNothingEnum enumerator

              Property IsolateBlending As Variant
              Member of InDesign.BlendingSetting
              If true, blending is applied only to the group. If false, blending includes all objects beneath the group. as Boolean or idNothingEnum enumerator

              Property KnockoutGroup As Variant
              Member of InDesign.BlendingSetting
              If true, the BlendingSetting is a knockout group. as Boolean or idNothingEnum enumerator

              Property Opacity As Variant
              Member of InDesign.BlendingSetting
              The fill opacity of the BlendingSetting (as a percentage). (Range: 0 to 100) as Double (0 - 100) or idNothingEnum enumerator (0 - 100)

              then

              With myTextFrame.ContentTransparencySettings.BlendingSettings
              .BlendMode = 1852797549 ' idBlendMode.idNormal
              .Opacity = 10
              End With

              robin

              --
              www.adobescripts.com
              • 4. Re: How To Affect Text Opacity
                Level 1
                That did the trick. Thank you very much
                • 5. Re: How To Affect Text Opacity
                  Level 1
                  Steve,

                  Please don't auto-respond complete messages back to the forum.

                  Thanks.

                  Dave