🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #17316

Re: Mixing Font sizes in textframe

#17316
From: roberto soto
Date: Wed, 18 Jun 2003 13:35
26 lines
1776 bytes
Hi Michael,

Maybe is a better way to solve this task, but this will work.

Roberto

Set myInDesign = CreateObject("InDesign.Application.2.0")
    Set myDocument = myInDesign.ActiveDocument
    myDocument.ViewPreferences.HorzMeasurementUnits = idMSPicas
    myDocument.ViewPreferences.VertMeasurementUnits = idMSPicas
    Set myPage = myDocument.Pages.Item(1)
    Set myTextFrame = myPage.TextFrames.Add
    myTextFrame.GeometricBounds = Array(10, 10, 25, 25)

myFirstWord = "Hello"
    mySecondWord = "World"

Set myPoint = myTextFrame.ParentStory.InsertionPoints

' Style16 and Style10 are character styles existing in InDesign document
    ' If not, you can created at run time
    myPoint.Item(myPoint.Count).CharacterStyle = myDocument.CharStyles.Item("Style16")
    myPoint.Item(myPoint.Count).TextContents = myFirstWord & " "

myPoint.Item(myPoint.Count).CharacterStyle = myDocument.CharStyles.Item("Style10")
    myPoint.Item(myPoint.Count).TextContents = mySecondWord
Technical Details
Message-ID: <1de99494.2@WebX.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
References: <1de99494.-1@WebX.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,1249078226b6dff6
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2003-06-18 06:37:59 PST
From: "roberto soto" <roberto1soto@hotmail.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX
Newsgroups: adobe.scripting.indesign
Subject: Re: Mixing Font sizes in textframe
Message-ID: <1de99494.2@WebX.la2eafNXanI>
Date: Wed, 18 Jun 2003 06:35:33 -0700
References: <1de99494.-1@WebX.la2eafNXanI>
Lines: 29
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit