[CS3][JS] Internally hyperlinking a document

Hi All,
I'm trying to internally link a document by section numbers.  Our books have what we call an analysis, which is basically a mini-table of contents at each chapter.  The idea was to link the analysis to the section headings, starting longest section numbers first. And, their may be multiple sources linking up to one destination.
An example of the section numbers is 53-129a.  I used a search to find all the section numbers - app.findGrepPreferences.findWhat = "(53.\\d\\d\\d\\l+)";
It seems to find all the section numbers as expected, but when it gets to the final loop where it actually does the linking, it ignores the letter at the end of the section numbers and I get an error because it tries to create multiple source links to 53-129a.
An example document is attached and the full script is below.  I've run out of ideas; please let me know if you can help.
Thanks,
Mike
var myDoc = app.activeDocument
var myHyperlinkStyle = myDoc.characterStyles.item("hyperlink");
//Link destination:
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = "(53.\\d\\d\\d\\l+)";
app.findGrepPreferences.appliedParagraphStyle = "Catchline"  //catchlines are the section headings
var myFoundCatchline = app.activeDocument.findGrep();
for (var z = myFoundCatchline.length-1; z >= 0; z--){
//$.writeln (myFoundCatchline[z].contents)
var myHyperlinkDestination = myDoc.hyperlinkTextDestinations.add(myFoundCatchline[z])
//Link source(s):
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.findWhat = myFoundCatchline[z].contents
app.findGrepPreferences.appliedParagraphStyle = "Analysis"
var myFoundAnalysis = app.activeDocument.findGrep();
for (var i = myFoundAnalysis.length-1; i >= 0; i--){
  //$.writeln (myFoundAnalysis[i].contents)
  var myHyperlinkTextSource = myDoc.hyperlinkTextSources.add(myFoundAnalysis[i])
  var myHyperlink = myDoc.hyperlinks.add (myHyperlinkTextSource, myHyperlinkDestination, undefined)
  myHyperlink.visible = false
  myFoundAnalysis[i].appliedCharacterStyle = myHyperlinkStyle

Could this maybe have something to do with plugins?
I had a similar problem before on the desktop version. I couldn't create a package because the file was created on an InDesign which had plugins I didn't have.
Our server uses some plugins, but since the packaging is done by the same server, this shouldn't be a problem I guess.
I tried to delete contents from the original INDD file to see if fonts, links or other things were creating the problem. Now I've got an INDD file wich is as good as empty, and it still won't package on the server. If I try to do this on my InDesign CS3 desktop version it works.
Last thing I noticed in the instructions file, it says:
FILE PACKAGE LIST
1. 26a.indd; type: Adobe InDesign publication; size: 0K
The size of the original document is about 1Mb, why would it say 0 Kb ?
I really hope someone knows what is causing this.
Thanks,
Dany

Similar Messages

  • Using PDF Pack to convert a .docx document containing internal hyperlinks

     
    I just used PDF Pack to convert a .docx document to pdf format. The document contained a hyperlink to a bookmark within the document. The text converted OK, and the hyperlinked text was underlined, but not active. Clicking on the hyperlinked text did nothing. It seems that internal hyperlinks don’t convert using this software.
    Thanks for any advice
    David

    Hi,
    When you export your PDF file to Word file please select .doc format option rather than docx format for MS Word.
    Thank you.
    Hisami

  • How to return to a document-intern hyperlink with adobe reader x?

    A well structured WORD document contains a lot of internal hyperlinks. They survive within the equivalent PDF-Dokument. Therein it es quite easy to follow the links by clicking onto them. But there seams to be no possibility to return to the source position of the specific hyperlink. I'm sorry that I found no help until now.
    edi-ko

    Use the menu View > Page Navigation > Previous View

  • Convert Excel documents with internal hyperlinks.

    Can you convert a multiple worksheet excel file with internal hyperlinks to a pdf file? bookmarks are alright too as long as its accessible by one file

    > Can you convert a multiple worksheet excel file with internal hyperlinks to a pdf file?
    Yes, I can. But not with Adobe Reader.

  • How can I create an internal hyperlink in iWeb? Would like to put an interactive menu at the top of a page.

    How can I create an internal hyperlink in iWeb? Would like to put an interactive menu at the top of a page.

    Do you meant a link to one of your other pages or to a location on one of your pages?  If it's the latter those are called anchors and iWeb does not support them.  However, there are workarounds for that.  See this blog: How to use anchors in iWeb.  If you don't have a lot of widgets on the page it can work fairly well.
    OT

  • InDesign cs3 crashes when opening CS2 documents

    ID cs3 crashes when opening CS2 documents, not when open dialog appears, but after I choose file and it "starts" opening it. (core duo, xp, clean install, all updates)
    If i open ID by opening file, it crashes with standard windows dialog, if I open ID first, it does not crash, but rather behaves strangely, nothing is opening, if I move a mouse it turns to sand clock.
    Same thing happens on all machines with ID cs3 in my office.
    All other apps works fine. I did read every single forum about ID crashing and nothing helps. Files resaved in interchange format opens well. There must be something in the files that ID cs2 did and what id cs3 cannot open :( Any ideas?

    1. Is there any reason to use eps? Avoid it use AI, PSD or PDF instead.
    2. Are all used fonts ok? What kind of fonts du you use?
    3. Which Mac OS X do you use?
    Does it crash with alwayst the same files?
    What does the file history tell you? Hold down the command key and got to InDesign > About InDesign… Does it tell you somewhat more specific, like missing plugins, severly damaged files and restored files, when (in which version) the files have been created first (helps often to export to IDML and open this again and save it as INDD and work with the new file.), has the problematic file been converted from another application (Quark Xpress or PageMaker), etc.

  • Interactive Report Hyperlinks to Document

    I am converting an Access database to Apex manually due to the Access DB design flaws. I'm exporting tables that contain hyperlinks to documents on our server (from Access the user can link to the document). On export the liinked text exported as "title of document#link to server#" so I separated them into two columns. I now have the document title in one column and the hyperlink to that document in another, and created an interactive report containing those two columns along with the rest of the columns (i.e., DOCNO, NAME, LINK, DATE, etc.)
    I want the user to link from the Interative Report link to that particular document on our server using the active link that I trimmed out.
    How?
    Your ideas welcomed!
    Thank you!
    Alexandra

    Answer is on page 276 of Scott/Spendolini book.
    Interactive Report
    Go to Edit Interactive Report
    Link Column: Link to Custom Target
    Link Icon: #YOUR_COLUMN_NAME#
    Target: URL
    URL: #NAME_OF_COLUMN_THAT_CONTAINS_LINK#

  • Word internal hyperlinks

    How to retain internal hyperlinks (figure/table cross references) from Word to InDesign.
    Any help?
    Thanks
    Sam

    how many files you have to convert from WORD to InDesign ??
    I can write tool for this - but not for free ...
    robin
    www.adobescripts.com

  • Internal hyperlinks only work aftger refressing the page with Firefox 16.0.2.

    Using JIRA we can not focus on the internal hyperlink until the page has fully displayed. Once the page loaded then a refresh is required to jump to the link. Other browsers IE8, IE9 and Chrome work with out issue.
    <br />
    <pre><nowiki><a href="/browse/BIT-1968?focusedCommentId=1252847&amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-1252847" title="A permanent link to this comment." class="icon icon-perma activitymodule-link"><span>Permalink</span></a></nowiki></pre>

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • Internal And External Documents

    what are the internal and external documents of SAP MM

    Hi,
    PR is an internal doc. These documents are required and maintained in the company....These docs may be usefull for own accountings..
    PO, IR is external doc...These doc are maintained for the vendor, customer etc...
    Regards
    Priyanka.P

  • Possible to insert a HYPERLINK in document HEADER?

    Subject: Possible to insert a HYPERLINK in document HEADER?
    I have a 300 page document, where the first page is a "Table of Contents".
    I would like to provide the readers with a QUICK way ("no-brainer/easy" way) for the reader to JUMP back to that "Table of Contents" page from any place in the document.
    Can I, perhaps, insert a hyperlink to the "Table of Contents" in the document HEADER? Or is there a different way to go about this?
    Thanks for anybody's creative answer (the simpler the better . . . .)

    Hi.
    Thanks for your reply.
    It was originally a Microsoft Word document. I just clicked "convert to pdf" from the toolbar. Then, in Acrobat 8, I have inserted a page-number header.
    Can I perhaps insert a hyperlink within that HEADER . . . pointing back to the first (Table of Contents) page?

  • How to reverse Internal order Budget document?

    Hi,
    How to reverse the Internal order Budget document.
    I m abble to see the doc by KO2B.
    Please let me know if more information required.
    Thanks.

    Hi,
    Please first create an auxiliary program ZDELORBU as an executable program in a customer owned development class and with the source code in the note 1145955.
    To delete the budgets of orders and to reset their 'Budgeted' status, please:
    -  run txn KO32 to deactivate availability control of orders (if active)
    -  run ZDELORBU for orders.
    please test this throughly in a test system first.
    regards
    Waman

  • I purchased adobe cs3 by download and have documents that no longer connect me with the site to re-download.  How can I access my purchase to download again?

    I purchased adobe cs3 by download and have documents to prove purchase that no longer connect me to the site to re-download my purchase. I was forced to change from microsoft XP and to install Microsoft Windows. How do I access my purchase to download again on my computer now?

    Hello,
    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!
    Thank you.
    <!-- VERY important to include-->
    <b>WARNING:</b> Do not run Firefox's uninstaller or use a third party remover as part of this process, because that could permanently delete your Firefox data, including but not limited to, extensions, cache, cookies, bookmarks, personal settings and saved passwords. <u>These cannot be recovered unless they have been backed up to an external device!</u>

  • Configure internal number for document in "depreciation run"

    Hi Experts!
    When I execute "Depreciation Run", it notice error:
    Create document number range 03 using internal number assignment
    Message no. AA776
    Diagnosis
    Processing terminated because the document number range 03 for year 2008 was set up with external number assignment.
    System Response
    For periodic posting of depreciation, you have to create a document number range with internal number assignment, since the document numbers are assigned from Financial Accounting.
    Procedure
    Change the number assignment for the number range 03 from external to internal in Customizing for Asset Accounting. See SAP Note 890976 for more information.
    Please tell me the way to configure internal number for document in "depreciation run"
    Thanks & Reguards
    Ngocpt.

    Hi,
    Go to transaction code FBN1
    In the change option go to document range 03.  IF its an external number assignment there is a tick in the box " ext".
    If you want to change it to internal you just have to remove the tick.
    Before doing so please check the document type used fo depreciation  and the corresponding number ranges assigned.
    Hope this helps.
    GU

  • Back button for internal hyperlinks?

    I've created internal hyperlinks with IBA (to other chapters in the text) and for the most part, they work. But there is no back button? Help! And thanks!

    true, IBA books do not have a back better, per se. However, tap on the bookmark icon and you will see a section called "Recenlty viewed". It can be used to navigate back after a user taps on an internal link.

Maybe you are looking for

  • Moved ??? file and imovie no longer opens any movies

    Hi, I hope someone can help. While trying to reduce file size I did a search (using finder) and came across a file with the filename ??? in my imovie folder. I removed it to the trash and imovie would no longer open any of my movies. I took it out of

  • Replacement ipod headphones

    i got an ipod touch in july 2008 from Amazon and the supplied headphone have broken, would i still be able to get replacements under the 1 year warranty from an apple store if i took along a print off of the order form ? i know people will say apple

  • SQL agent scheduling for SSIS package

    I have a package with a souce and destination connection using login as 'sa'. I created a scheduling task to call this package for running. However the sql agent service is running as domain user . It required to be running as domain user as per requ

  • Show ItemRenderer only when editing (onclick)

    I have a datagrid, that after the user has logged in becomes editable. I would like that when the user clicks into a given field, say a date or number field, an itemRenderer that corresponds to the type of date appear. Example: if i click into the da

  • Error Message For Logon

    Hi All, There are 3 scenario for which we can have error message on logon page of EP 1) Wrong Password 2) Wrong UID 3) UID locked But on EP6 we have only one message being flash on screen and that is User authentication failed To make this error mess