Question
[VB/CS3] Setting Tabstops in Textframe
Hi Folks,
I got a simple problem I think. My Testscript creates a Textframe and Adds a Headline and Paragraphs to it. What I wanna do is simply set a Tabstop to each paragraph excluding the Headline.
I searched the documentation and this forum but couldnt find anything about setting tabstops in VB. Would be nice if someone could help.
Rem Creates a text frame in an example document,
Rem enters text in the text frame.
Rem
Set myInDesign = CreateObject("InDesign.Application.CS3")
Rem Make an example document.
Set myDocument = myInDesign.Documents.Add
Rem Set the measurement units to points.
myDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idPoints
myDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idPoints
Rem Create a text frame on page 1.
Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
myTextFrame.geometricBounds = Array(72, 72, 288, 288)
myTextFrame.Contents = "Headline:" & vbCr
Rem Writes 4 Paragraphs
For i = 1 To 4
myTextFrame.InsertionPoints.Item(-1).Contents = " Paragraph" & i & vbCr
Next
I got a simple problem I think. My Testscript creates a Textframe and Adds a Headline and Paragraphs to it. What I wanna do is simply set a Tabstop to each paragraph excluding the Headline.
I searched the documentation and this forum but couldnt find anything about setting tabstops in VB. Would be nice if someone could help.
Rem Creates a text frame in an example document,
Rem enters text in the text frame.
Rem
Set myInDesign = CreateObject("InDesign.Application.CS3")
Rem Make an example document.
Set myDocument = myInDesign.Documents.Add
Rem Set the measurement units to points.
myDocument.ViewPreferences.HorizontalMeasurementUnits = idMeasurementUnits.idPoints
myDocument.ViewPreferences.VerticalMeasurementUnits = idMeasurementUnits.idPoints
Rem Create a text frame on page 1.
Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
myTextFrame.geometricBounds = Array(72, 72, 288, 288)
myTextFrame.Contents = "Headline:" & vbCr
Rem Writes 4 Paragraphs
For i = 1 To 4
myTextFrame.InsertionPoints.Item(-1).Contents = " Paragraph" & i & vbCr
Next
