Article View: adobe.scripting.indesign
Article #18419Omit textframe onmasterpage?
From: pjredman
Date: Fri, 21 Mar 2003 23:38
Date: Fri, 21 Mar 2003 23:38
25 lines
1954 bytes
1954 bytes
I have a script that applies xml tags to text frames and their paragraphs. I'd like it to ignore text frames that are on master pages. How do I do this? Here's a piece of the script:
Private Sub Command1_Click()
Dim myInDesign As InDesign.Application
Set myInDesign = CreateObject("InDesign.Application.2.0")
Set myDocument = myInDesign.ActiveDocument
Text1.Text = "Working..."
For myStoryCount = 1 To myDocument.Stories.Count
Set myStory = myDocument.Stories.Item(myStoryCount)
myXMLTag = "Story"
Set myXMLStory = myDocument.XMLElements.Add(myXMLTag, myStory.TextFrames.Item(1))
For myParaCount = 1 To myStory.Paragraphs.Count
Set myPara = myStory.Paragraphs.Item(myParaCount)
Select Case myPara.ParagraphStyle
Case "Body Text"
myXMLTag = "bodytext"
Set myXMLPara = myXMLStory.XMLElements.Add(myXMLTag, myPara)
Case "Heading 1"
myXMLTag = "heading1"
Set myXMLPara = myXMLStory.XMLElements.Add(myXMLTag, myPara)
Case "Heading 2"
myXMLTag = "heading2"...
Thanks,
Phil Redman
Technical Details
Message-ID:
<1de86769.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f81867c638df944b,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-03-21 16:07:40 PST From: pjredman <pjredman@usgs.gov> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-08!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: Omit textframe onmasterpage? Message-ID: <1de86769.-1@WebX.la2eafNXanI> Date: Fri, 21 Mar 2003 15:38:39 -0800 Lines: 30 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit