🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #14587

Re: TextWrap properties (VB)

#14587
From: Marc_Kersten
Date: Thu, 22 Jan 2004 21:27
41 lines
2160 bytes
Thanx, but it didnt work either.

Here is the full script until the errors occur (in the outcommented lines)

Sub Bildrahmen()

'Automatisches erstellen des EXIT-typischen Bildrahmens

Set myInDesign = CreateObject("InDesign.Application.CS")
Set myDocument = myInDesign.ActiveDocument
Set myWindow = myInDesign.ActiveWindow
Set mySpread = myWindow.ActiveSpread
Set mySelection = myDocument.Selection.Item(1)
mySelection.StrokeWeight = 0
myBounds = mySelection.GeometricBounds
myLinks = myBounds(1) - 2.5
myOben = myBounds(0) - 3
myRechts = myBounds(3) + 2.5
myUnten = myBounds(2) + 8

'mySelection.StrokeWeight = 0

'Neuen Rahmen erstellen

Dim myNewTextFrame
Set myNewTextFrame = mySpread.TextFrames.Add
myNewTextFrame.GeometricBounds = Array(myOben, myLinks, myUnten, myRechts)
myNewTextFrame.StrokeWeight = 0
myNewTextFrame.TextFramePreferences.TextColumnCount = 1
myNewTextFrame.TextFramePreferences.UseFixedColumnWidth = False
myNewTextFrame.TextFramePreferences.InsetSpacing = 0
myNewTextFrame.TextFramePreferences.IgnoreWrap = True
'With myNewTextFrame.TextFramePreferences
'.VerticalJustification = idTopAlign
'End With
myNewTextFrame.TextFramePreferences.MinimumFirstBaselineOffset = 0
'myNewTextFrame.TextWrapPreferences = InDesign.idTextWrapTypes.idBoundingBoxTextWrap

myNewTextFrame.TextWrapPreferences.TextWrapOffset = Array(2, 4, 4, 4)

The script assumes a selected object and a frame was always selected when running the script from Microsofts VB 6.0 editor in Office 10 Developer.
Technical Details
Message-ID: <2ccf7879.1@webx.la2eafNXanI>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
References: <2ccf7879.-1@webx.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f939a,eebc9ec58a8d0b59
X-Google-Attributes: gidf939a,public
X-Google-ArrivalTime: 2004-01-22 13:38:01 PST
From: Marc_Kersten@adobeforums.com
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!fu-berlin.de!newsfeed01.sul.t-online.de!t-online.de!webx
Newsgroups: adobe.scripting.indesign
Subject: Re: TextWrap properties (VB)
Message-ID: <2ccf7879.1@webx.la2eafNXanI>
Date: Thu, 22 Jan 2004 13:27:14 -0800
References: <2ccf7879.-1@webx.la2eafNXanI>
Lines: 46
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit