Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apply font to textframe with scripting

Status
Not open for further replies.

magmo

Programmer
May 26, 2004
291
SE
Hi


Can anyone show me ho I can apply a certain font and fontsize to text that is in a textframe using visual basic.net. Also, is it possible to have different fonts and sizes inside the same textframe, I would in that case be very happy if an example is shown to me.


This is what I got so far..


Dim myIndesign As InDesign.Application
Dim myDocument As InDesign.Document
Dim myPage As InDesign.Page
Dim myTextFrame As InDesign.TextFrame
Dim myArray As Array
Dim myIntArray() As Integer = {10, 10, 20, 30}

myIndesign = CreateObject("Indesign.Application")
myDocument = myIndesign.Documents.Add
myPage = myDocument.Pages.Item(1)

'Create a text frame
myTextFrame = myDocument.TextFrames.Add
myTextFrame.GeometricBounds = myIntArray

myTextFrame.TextContents = ("Hello World")



Regards
 
magmo,

first -
I see - you use ID 2.0.2 :)

what you want to "style"??

Word(s) ??
range of chars ??
TextLine(s) ??
Paragraph(s) ??
whole TextFrame ??

I don't use VB.net - only VB 6.0 ... but maby I can help you :)

robin

Scripts for AdobeFamily
gg 3753393
Skype: indesignscripts
 
Hi Robin

I would like to style words, range of chars or the whole textframe. All help is very appreciated.

Also, do you know where the old indesign 2 scripting help can be downloaded. I have allready downloaded the new CS version, but I would like the old one as well.

Regards
 
magmo,

"-- InDesign 2.x: The InDesign Scripting Guide is located in the Adobe Technical Info/Scripting folder on the InDesign 2.x CD-ROM."

robin

Scripts for AdobeFamily
gg 3753393
Skype: indesignscripts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top