Article View: adobe.scripting.indesign
Article #8514VB - Ind CS2 - Windows XP - VerticalJustification Error
From: David_Walsh
Date: Fri, 06 Oct 2006 18:01
Date: Fri, 06 Oct 2006 18:01
20 lines
1513 bytes
1513 bytes
Just starting to learn how to code with VBScript.
The last line of this code generates an error.
"myTextFrame.TextFramePreferences.VerticalJustification = idVerticalJustification.idCenterAlign"
Error: Object required idVerticalJustification
Code: 800A01A8
Set myInDesign = CreateObject("InDesign.Application.CS2")
Rem Create an example document.
Set myDocument = myInDesign.Documents.Add
Rem myDocument.ViewPreferences.RulerOrigin = idRulerOrigin.idPageOrigin
myPageHeight = myDocument.DocumentPreferences.PageHeight
myPageWidth = myDocument.DocumentPreferences.PageWidth
Set myTextFrame = myDocument.Pages.Item(1).TextFrames.Add
myTextFrame.GeometricBounds = Array(0, 0, myPageHeight, myPageWidth)
myTextFrame.Contents = "This is a Test"
myTextFrame.Paragraphs.Item(1).PointSize = 72
myTextFrame.TextFramePreferences.VerticalJustification = idVerticalJustification.idCenterAlign
Technical Details
Message-ID:
<3bc1e50b.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!news.musoftware.de!newsfeed.x-privat.org!spool.x-privat.org!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,c7e6c6910f7367df X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: David_Walsh@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: VB - Ind CS2 - Windows XP - VerticalJustification Error Message-ID: <3bc1e50b.-1@webcrossing.la2eafNXanI> Date: Fri, 6 Oct 2006 11:01:09 -0700 Lines: 22 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news1.google.com!news.germany.com!news.musoftware.de!newsfeed.x-privat.org!spool.x-privat.org!webcrossing