Article View: adobe.scripting.indesign
Article #20444Re: [VB] Styles & Textframe
From: Micha0827
Date: Wed, 10 Jul 2002 20:35
Date: Wed, 10 Jul 2002 20:35
38 lines
2803 bytes
2803 bytes
Hi Ole, i think it's better when i give you my Code :)
Thanks
Michael
Dim myInDesign As InDesign.Application
����Set myInDesign = CreateObject("InDesign.Application.2.0")
����Set myDocument = myInDesign.Documents.Add
����Set myParaStyle = myDocument.ParaStyles.Add
����myParaStyle.Name = "Katalognummer"
����myParaStyle.PointSize = 9.6
����myParaStyle.BaselineShift = -3.8
����myParaStyle.FontStyle = "Normal"
����myParaStyle.AppliedFont = "Verdana"
����myParaStyle.Justification = idCenter
����TheFolder$ = BrowseForFolder("W�hlen Sie einen Ordner aus.")
����Set objFileSys = CreateObject("Scripting.FileSystemObject")
����Set objFolder = objFileSys.GetFolder(TheFolder$)
����Set objSubFolders = objFolder.SubFolders
����Set objFiles = objFolder.Files
����For Each AFile In objFiles
��������Set myPage = myDocument.Pages.Add
��������myFile = TheFolder$ & "\" & AFile.Name
��������Set myImage = myPage.Place(myFile, placePoint:=Array("10", "10"))
��������Set Img = CreateObject("ImgSize.Check")
��������Img.FileName = myFile
��������myBild_Width = Img.Width
��������myBild_Height = Img.Height
��������myBild_Width_mm = FormatNumber(myBild_Width / 118.11 * 10, 2)
��������myBild_Height_mm = FormatNumber(myBild_Height / 118.11 * 10, 2)
��������Set Img = Nothing
��������Set myTextFrame = myPage.TextFrames.Add
��������myTextFrame.GeometricBounds = Array(20 + myBild_Height_mm, 10 + myBild_Width_mm, 10 + myBild_Height_mm, "10")
��������myTextFrame.TextContents = AFile.Name
����Next AFile
����For myCounter = 1 To myDocument.Stories.Count
����myDocument.Stories.Item(myCounter).ParagraphStyle = myDocument.ParaStyles.Item("Katalognummer")
���Next
Technical Details
Message-ID:
<ef98f7d.8@WebX.aaQKaf7vad4>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebXReferences:
<ef98f7d.-1@WebX.aaQKaf7vad4>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: f939a,7b9db41252d8cfb9 X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2002-07-10 15:10:17 PST From: Micha0827 <gross.m@hamburg.de> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newsfeed.news2me.com!opentransit.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Re: [VB] Styles & Textframe Message-ID: <ef98f7d.8@WebX.aaQKaf7vad4> Date: Wed, 10 Jul 2002 13:35:22 -0700 References: <ef98f7d.-1@WebX.aaQKaf7vad4> Lines: 41 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit