Article View: adobe.scripting.indesign
Article #2223Re: [CS4 JavaScript] Cross references
From: Rick_Quatro
Date: Tue, 06 Jan 2009 20:07
Date: Tue, 06 Jan 2009 20:07
25 lines
1682 bytes
1682 bytes
I have the basics of cross-references; now I want to insert some external cross-references. Here is the basics of what I have working.
// destDoc = destination document.
// xrefDoc = adding cross-reference to this doc.
// Get a pre-existing destination from the destination document.
var dest = destDoc.paragraphDestinations.item('2916');
// Get the cross-reference format.
var xrefFmt = xrefDoc.crossReferenceFormats.item('Full Paragraph & Page Number');
// Add the cross-reference source.
var source = xrefDoc.crossReferenceSources.add(app.selection[0],xrefFmt);
// Add the cross-reference.
var xref = xrefDoc.hyperlinks.add(source,dest);
This works; however, I am trying to find a way to add a cross-reference without first getting the ParagaphDestination from the destination document. I know the name of the destination document and I know the name of the destination, and I would like to build the external cross-reference without having to open the destination document. Does anyone know if this is possible? Thanks in advance.
Rick Quatro
585-659-8267
Technical Details
Message-ID:
<59b74dde.6@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b74dde.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,91522556f5796bab X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Rick_Quatro@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: [CS4 JavaScript] Cross references Message-ID: <59b74dde.6@webcrossing.la2eafNXanI> Date: Tue, 6 Jan 2009 12:07:26 -0800 References: <59b74dde.-1@webcrossing.la2eafNXanI> Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit