HyperlinkPageItemSources

I am scripting InDesign CS3 using VB Script in the MS Windows environment.
My objective is to add Hyperlinks to images so exported PDFs expose the links. The images are each placed in a table cell.
I can not determine the correct use of the HyperlinkPageItemSources.Add method syntax.
***** CODE IN QUESTION *******
Set oCell = oRow.Cells.Item(intCellNum)
oCell.InsertionPoints.FirstItem.Place ("ImagePath\FileName")
Set oRectangle = oCell.AllGraphics.FirstItem.Parent
' the next line gets Run-time Error '13': Type mismatch
Set oHyperlinkPageItemSource = oDocument.HyperlinkPageItemSources.Add(oRectangle)
Set oHyperlinkURLDestination = oDocument.HyperlinkURLDestinations.Add("http://www.desired_link.com")
Set oHyperlink = oDocument.Hyperlinks.Add(oHyperlinkPageItemSource, oHyperlinkURLDestination)
***** END OF CODE IN QUESTION *******
I believe oRectangle (Dim oRectangle As InDesign.Rectangle) is an InDesign PageItem which I believe is the requirement for the .Add method.
Is this a bug or does my code need correcting?
Any help appreciated. Thank you.

Well, nice idea but not a solution.
I got the same problem with VB and CS5. I try to do something like that:
Dim mInDesign As InDesign.Application
Dim mPub As InDesign.Document
Dim mHyperlink As InDesign.Hyperlink
Set mInDesign = GetObject("", "InDesign.Application.CS5")
Set mPub = mInDesign.Documents.Item(1)
Dim mRectangle as InDesign.Rectangle
'REM - rectangleID is a Long parameter for this function and is a valid rectangle ID
Set mRectangle=mPub.Rectangles.ItemById(rectangleID)
Dim mHysperSource As InDesign.HyperlinkPageItemSource
Set mHysperSource = mPub.HyperlinkPageItemSources.Add(mRectangle)
Dim mDestination As InDesign.HyperlinkURLDestination
Set mDestination = mPub.HyperlinkURLDestinations.Add(mDocObj.rs.fields(mQuellDBField).Value)
Set mHyperlink = mPub.Hyperlinks.Add(mHysperSource, mDocObj.rs.fields(mQuellDBField))
mHyperlink.Visible = True
Well, the bold underlined line of code creates error 13 - type mismatch!
No mather what I am trying to use mRectangle.AllPageItems.Item(1), mRectangle.PageItems.Item(1), mRectangle.AllGraphics.Item(1) - still no success
Watching the variable shows mRectangle as Variant/Object/Rectange and mRectangle.AllGraphics.Item(1) as Variant/Object/Image
The Image is a JPEG Image....
Any suggestions how to get Hyperlinks working with Rectnagle? (I cannot use TextFrame with InsertionPoint... it is Rectangle and I cannot change it)
Regards
Jarema

Similar Messages

  • Hyperlink to a page

    Hi all
    I am trying to link all my images in a document.
    If I recognize the filename and it is a logo (only a limited logos are present) I link to the URL
    All others must link to a given page number.
    The first part works. But I can not figure out how to make the link to a page...
         case "cat 22m95y v1.eps":       
                var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
                myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("www.catfootwear.com");
                myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
                myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL );
                myHyperlink.visible=true;                                 
        break;
        default:
                $.writeln ("myImageJumperPage " + myImageJumperPage );
                $.writeln ("myImageJumperPage " + Number (myImageJumperPage) );
                var bla = Number (myImageJumperPage) ;
                $.writeln ("bla " + bla);
                var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
                myHyperlinkPage = myDocument.hyperlinkPageDestinations.add();
                myHyperlinkPage.destinationPage.pageNumber = myImageJumperPage;
                myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
                myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkPage);
                myHyperlink.visible=true;   
    Any hins appreciated
    Romano

    OK I get it the reference to a page does not work based on a number as in go to page 10
    Needed to create the reference in "page" terms first.
                var destPage = myDocument.pages.itemByName(myImageJumperPage.toString());
    This line changes (type cast) the number to a string, then finds the page with that (String)Name and creates a reference.
    I guess this could be coded in a more direct way, but I am happy.
    The code does the job
    Thanks for your help Hans
        case "cat 22m95y v1.eps":       
                $.writeln ("Found a logo, jump to website 2");
                var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
                var myHyperlinkURL = myDocument.hyperlinkURLDestinations.add("www.catfootwear.com");
                var myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
                var myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL );
                myHyperlink.visible = true;                                 
        break;
        default:
                $.writeln ("Found any image, create link to the price list on page: " + myImageJumperPage );
                var myHyperLinkeFrame = myFrame.parent.textFrames.add(myLabelLayer2, undefined, undefined,{geometricBounds : myGreyBoxBounds});
                var destPage = myDocument.pages.itemByName(myImageJumperPage.toString());
                var myHyperlinkDestination = myMakeHyperlinkDestination(destPage, myDocument);            
                var myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myHyperLinkeFrame);
                var myHyperlink = myDocument.hyperlinks.add(myHyperlinkSource, myHyperlinkDestination);
                myHyperlink.visible = true;   
    function myMakeHyperlinkDestination(myDestPage, myDocument){
        //If the hyperlink destination already exists, use it;
        //if it doesn't, then create it.
        try{
            var myHyperlinkDestination = myDocument.hyperlinkDestinations.item(myDestPage);
            myHyperlinkDestination.name;
        catch(myError){
            myHyperlinkDestination = myDocument.hyperlinkPageDestinations.add(myDestPage);
            myHyperlinkDestination.destinationPage = myDestPage;
        //myHyperlinkDestination.name = myDestPage.name;
        //Set other hyperlink properties here, if necessary.
        return myHyperlinkDestination;

  • How do I dynamically create a hyperlink in Indesign with vb

    Hi, does anyone know how to create a dynamic link to Indesign with vb? I'm coding a catalog from Access database with images and would like to make an "Enlarge image" hyperlink while generating the page. Somehow I seem to have no luck in my code. Thanks for any suggestions.

    As simple as it sounds to create hyperlinks with VB into Indesign CS4 it really took time and effort to finally
    come up with the solution. With the kind help of  Max Dunn an old InDesign scripting bug with VB was discovered responsible for this. But if you split the job into two parts it can be done.
    First make the document without hyperlinks in VB by putting the URLs in script labels on each graphic frame. Then in Indesing run a post-processing script in JavaScript that iterates through the graphic frames, and for each, if it has a script label, set that as the URL for hyperlink.
    Here is how I did it in Indesign.
    var myDocument = app.documents.item(0);
    for(var myCounter = myDocument.rectangles.length-1; myCounter >= 0; myCounter --){
    alert(myCounter)
    var myRectangle = myDocument.rectangles.item(myCounter);
    var myLabel = myDocument.rectangles.item(myCounter).label;
    try{
    myHyperlinkURL = myDocument.hyperlinkURLDestinations.add(myLabel);
    myHyperlinkSource = myDocument.hyperlinkPageItemSources.add(myRectangle);
    myHyperlink=myDocument.hyperlinks.add(myHyperlinkSource,myHyperlinkURL);
    myHyperlink.visible=false;
    catch(myError){

  • [JS, CS3]  Setting Page Destination on Button

    Hi
    I unsuccessfull try to set the a Page Destination on a Button.
    The script loops through the Document and picks certain textframes, which contain the page.name as text. inside the loop I do this:
    // START LOOP
    // Getting the Content of Textframe -> this is the destination Page Number
    myDestinationPage = myDocument.pages.itemByName ( myDocument.pages[ pageIterator ].textFrames[ textFrameIterator ].contents );
    // Creating a HyperlinkPageDestinationObject
    myHyperlinkPageDestination = myDocument.hyperlinkPageDestinations.add( myDestinationPage );
    // Creating a new Button over a certain area on the actual Page - setting visibility off
    myButton = myDocument.pages[ pageIterator ].buttons.add({visibilityInPdf:1181247844, geometricBounds:[ myDocument.pages[ pageIterator ].textFrames[ textFrameIterator ].geometricBounds[ 0 ],12,myDocument.pages[ pageIterator ].textFrames[ textFrameIterator ].geometricBounds[ 2 ], myDocument.pages[ pageIterator ].textFrames[ textFrameIterator ].geometricBounds[ 3 ]]});
    // Creating an hyperlinkPageItemSource = the Actual Button myHyperlinkPageItemSource = myDocument.hyperlinkPageItemSources.add( myButton );
    // Creating an Hyperlink
    myHyperlink = myDocument.hyperlinks.add( myHyperlinkPageItemSource, myHyperlinkPageDestination );
    //The Destination shall be a Ceratin Page so I add a gotoAnchorBehavior
    myGotoAnchorBehavior = myButton.gotoAnchorBehaviors.add();
    // Now I try to set the Anchor Target. I think that's not working...
    myGotoAnchorBehavior.anchorItem =myHyperlink;
    // END LOOP
    The Buttons are there, the Destinations as well, but the ceratin button has not the desired Page as destination. Does someone have a hint on this topic?
    Thanks and greets
    Stefan

    Hi Keith,
    myDoc.activeLayer = myDoc.layers.item("Layer 1");
    Kasyan

  • [JS][CS4-5] Apply hyperlink to xml tagged object

    Hi,
    Can anyone please help me? I'm strugling with this problem for days....
    I'm trying to apply a new hyperlink to a xml tagged object (piece of text, frame or image)...
    The script trows an error "wrong source. Expected text but received XML element"
    Does anyone know how i can fix this?
    Thanks
    Code:
    var myDoc = app.documents[0];
    Check(myDoc.associatedXMLElement);
    alert("Done !");  
    //recursive function
    function Check(elm){
             for(var i=0; i<elm.xmlElements.length; i++){
                   myXMLElement = elm.xmlElements[i];
                   XMLelementName = myXMLElement.markupTag.name.toString();
                   // only apply to tagged object using the tag "Hyperlink"
                   if (XMLelementName == "Hyperlink"){
                          var myHyperlinkURL = myDoc.hyperlinkURLDestinations.add("http://www.google.com");
                          myHyperlinkURL.name = "http://www.google.com";
                          var myObject = elm.parent;
                          if(!( elm.xmlAttributes.item("href") == null)){
                                    // it's a picture
                                   // i'm not sure this will work
                                myHyperlinkSource = myDoc.hyperlinkPageItemSources.add(myObject);                 
                          }else{
                                   // it's not a picture
                                  // Error is in the line below
                                myHyperlinkSource = myDoc.hyperlinkTextSources.add(myObject);                 
                          var myHyperlink = myDoc.hyperlinks.add(myHyperlinkSource, myHyperlinkURL);
           // process all sub elements
           for (var i = 0; i < elm.xmlElements.length; i++){
                Check(elm.xmlElements[i]);

    Hi,
    Thanks for your feedback.
    Due to your great feedback, I've made some changes to the line below...
    var myObject = elm.texts[0];
    When performing the script, a hyperlink is added to all text in the textframe, not only to the text tagged by the xml tag. Does anyone know how this can be fxed?
    Also, when trying to do the same thing for  an image, but this doen't work...
    var myObject = elm.images[0];
    An error occures.
    And what about a empty graphic frame ? How can I add a hyperlink to frame if it's tagged by a certain xml tage?
    Any feedback would be helpfull...
    Tim

  • Hyperlink to button CS6

    Hello is use this script in Indesign CS5 and it works. Now i have CS6 and it's not working anymore.
    It makes the yellow bar but the hyperlink is empty.
    Does somebody know to fix this?
    Kind regards,
    Patrick
    /* Copyright 2014, Kasyan Servetsky
    February 3, 2014
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */ 
    //====================================================================================== 
    var scriptName = "Convert hyperlinks to buttons - 2.0", 
    doc; 
    Main(); 
    //===================================== FUNCTIONS  ====================================== 
    function Main() { 
        var hyperlink, source, sourceText, destination, page, arr, outlinedText, gb, button, behavior, sourcePageItem, 
        barodeCount = 0, 
        hypCount = 0; 
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true); 
        var startTime = new Date(); 
        doc = app.activeDocument; 
        var layer = MakeLayer("Buttons"); 
        var swatch = MakeColor("RGB Yellow", ColorSpace.RGB, ColorModel.process, [255, 255, 0]); 
        var hyperlinks = doc.hyperlinks; 
        var progressWin = new Window ("window", scriptName); 
        progressBar = progressWin.add ("progressbar", undefined, 0, undefined); 
        progressBar.preferredSize.width = 450; 
        progressTxt = progressWin.add("statictext", undefined,  "Starting processing hyperlinks"); 
        progressTxt.preferredSize.width = 400; 
        progressTxt.preferredSize.height = 30; 
        progressTxt.alignment = "left"; 
        progressBar.maxvalue = hyperlinks.length; 
        progressWin.show(); 
        for (var i = hyperlinks.length-1; i >= 0; i--) { 
            hyperlink = hyperlinks[i]; 
            source = hyperlink.source; 
            destination = hyperlink.destination; 
            if (source.constructor.name == "HyperlinkTextSource") { 
                sourceText = source.sourceText; 
                page = sourceText.parentTextFrames[0].parentPage; 
                arr = sourceText.createOutlines(false); 
                outlinedText = arr[0]; 
                gb = outlinedText.geometricBounds; 
                outlinedText.remove();             
            else if (source.constructor.name == "HyperlinkPageItemSource") { 
                sourcePageItem = source.sourcePageItem; 
                gb = sourcePageItem.geometricBounds; 
                page = sourcePageItem.parentPage; 
            barodeCount++; 
            progressBar.value = barodeCount; 
            progressTxt.text = "Processing hyperlink " + hyperlink.name + " (Page - " + page.name + ")"; 
            if (source.constructor.name == "HyperlinkTextSource" || source.constructor.name == "HyperlinkPageItemSource") { 
                button = page.buttons.add(layer, {geometricBounds: gb, name: hyperlink.name}); 
                button.fillColor = swatch; 
                button.fillTint = 50; 
                button.groups[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;     
                behavior = button.gotoURLBehaviors.add(); 
                behavior.url = destination.destinationURL; 
                hyperlink.remove(); 
                source.remove(); 
                hypCount++; 
        var endTime = new Date(); 
        var duration = GetDuration(startTime, endTime); 
        progressWin.close(); 
        alert("Finished. " + hypCount + " hyperlinks were convertted to buttons.\n(time elapsed: " + duration + ")", scriptName); 
    function GetDuration(startTime, endTime) { 
        var str; 
        var duration = (endTime - startTime)/1000; 
        duration = Math.round(duration); 
        if (duration >= 60) { 
            var minutes = Math.floor(duration/60); 
            var seconds = duration - (minutes * 60); 
            str = minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second"); 
            if (minutes >= 60) { 
                var hours = Math.floor(minutes/60); 
                minutes = minutes - (hours * 60); 
                str = hours + ((hours != 1) ? " hours, " : " hour, ") + minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second"); 
        else { 
            str = duration + ((duration != 1) ? " seconds" : " second"); 
        return str; 
    function MakeLayer(name, layerColor) { 
        var layer = doc.layers.item(name); 
        if (!layer.isValid) { 
            layer = doc.layers.add({name: name}); 
            if (layerColor != undefined) layer.layerColor = layerColor; 
        return layer; 
    function MakeColor(colorName, colorSpace, colorModel, colorValue) { 
        var doc = app.activeDocument; 
        var color = doc.colors.item(colorName); 
        if (!color.isValid) { 
            color = doc.colors.add({name: colorName, space: colorSpace, model: colorModel, colorValue: colorValue}); 
        return color; 
    function ErrorExit(error, icon) { 
        alert(error, scriptName, icon); 
        exit(); 

    Hi Patric,
    Actually it was written in CS6. I just retested it in CC 2014 and it works for me (see the screenshots).
    Before
    After
    Regards,
    Kasyan

  • Create hyperlink for all images

    Hello everyone,
    I am new to scripting, but I am assuming my current task needs some scripting.
    I have a catalog laid out in InDesign.  It is about 250 pages and each page has about 10 image so there are about 2500 images.  The way I have them laid out is each image is placed inside a frame.  Now, I need to hyperlink each image to an external web site.  For example, for an image whose name is (12345.jpg), the hyperlink will be "https://www.testabc.com/productdetails.aspx?itemnum=12345".  Similarly if the next item is 67890, then the hyperlink would need to be "https://www.testabc.com/productdetails.aspx?itemnum=67890".  All images are linked to a folder on the computer.
    Can you please suggest how best to write and run this script.  Any and all help would be greatly appreciated.
    Thank you

    I can't test the script at the moment, but looking at it, I do notice that the entire for loop is within a try-catch. That means that if it encounters an error, it stops processing any more graphics. There may be a good reason for this, but I think you could just move the try-catch into the for loop, so it can catch any individual linking error without stopping completely. Something like this:
    var myDoc = app.activeDocument; 
    var  myGr = app.activeDocument.allGraphics; 
    alert(myGr.length) 
        for(i=0; i<myGr.length; i++) 
          try{
            var myGrName = String(myGr[i].itemLink.name); 
            var mySplitName = myGrName.split(".")[0]; 
            app.select(myGr[i].parent) 
            myHyperlinkPageItemSource =  app.activeDocument.hyperlinkPageItemSources.add(app.selection[0]) 
            var myHyperlinkURLDestination = app.activeDocument.hyperlinkURLDestinations.add("https://www.testabc.com/productdetails.aspx?itemnum=" + String(mySplitName)));
            var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkPageItemSource, myHyperlinkURLDestination, {name: "https://www.testabc.com/productdetails.aspx?itemnum=" + String(mySplitName)})   
            } catch(e){} 
    alert("Process Completed")
    The forum's syntax highlighting is giving me a hard time, but I would probably throw an "alert(myGrName)" into those catch brackets so you can begin to try to figure out where it's erroring out (if that is indeed the problem).
    Another thought is that, if there's a chance of multiple images with the same number, you might want to have your hyperlinkURLDestination check for an already existing destination before adding a new one.

  • [VB][CS5] Hyperlink on Rectangle problem - urgent

    Hi there,
    I got the a problem with VB and CS5. I try to do something like that:
    Dim mInDesign As InDesign.Application
    Dim mPub As InDesign.Document
    Dim mHyperlink As InDesign.Hyperlink
    Set mInDesign = GetObject("", "InDesign.Application.CS5")
    Set mPub = mInDesign.Documents.Item(1)
    Dim mRectangle as InDesign.Rectangle
    'REM - rectangleID is a Long parameter for this function and is a valid rectangle ID
    Set mRectangle=mPub.Rectangles.ItemById(rectangleID)
    Dim mHysperSource As InDesign.HyperlinkPageItemSource
    Set mHysperSource = mPub.HyperlinkPageItemSources.Add(mRectangle)
    Well, the bold underlined line of code creates error 13 - type mismatch!
    No mather what I am trying to use mRectangle.AllPageItems.Item(1), mRectangle.PageItems.Item(1), mRectangle.AllGraphics.Item(1) - still no success
    Watching the variable shows mRectangle as Variant/Object/Rectange and mRectangle.AllGraphics.Item(1) as Variant/Object/Image
    The Image is a JPEG Image....
    Any suggestions how to get Hyperlinks working with Rectnagle? (I cannot use TextFrame with InsertionPoint... it is Rectangle and I cannot change it)
    Regards
    Jarema

    I'm no VB expert, but what happens when you change:
    Set mRectangle=mPub.Rectangles.ItemById(rectangleID)
    to:
    Set mRectangle=mPub.PageItems.ItemById(rectangleID)
    Harbs

  • Hyperlink for images

    How to apply hyperlink for images. Please advice

    var myDoc = app.activeDocument;   
    var  myGr = app.activeDocument.links;   
    //    var myLink = myDoc.links; 
    //alert(myGr.length)   
        for(a=0; a<myGr.length; a++)   
          try{  
            var myGrName = String(myGr[a].name);   
            var mySplitName = myGrName.split(".")[0];
            app.select(myGr[a].parent)   
            myHyperlinkPageItemSource =  app.activeDocument.hyperlinkPageItemSources.add(app.selection[0])   
            var myHyperlinkURLDestination = app.activeDocument.hyperlinkURLDestinations.add( String(mySplitName));  
            var myHyperlink = app.activeDocument.hyperlinks.add(myHyperlinkPageItemSource, myHyperlinkURLDestination, {name:  String(mySplitName)})     
            } catch(e){}   
    alert("Process Completed")  

  • Extracting an image data merge field using only an indesign file and not document.dataMergeProperties.dataMergeFields

    Hi,
    I have kind of a weird requirement but I hope you guys can help out.
    I need to extract all the custom fields used in an indesign file without referencing the dataMergeProperties of a document. Sorry if this is a weird request it is just what I've been told (our system needs to not crash when people upload a variety of in design documents to generate high resolution jpg preview documents).
    I can already get all the text custom fields by looking for "<<" and ">>" in the text frames of a document but I'm having a really hard time finding the image custom fields.
    I tried looking at the rectangles for a given page but that didn't seem to help (but maybe i'm missing some there). I also tried looking at the graphics and images collection of a document but this seemed to return only graphics that are hard coded on the in design document and not the custom image fields.
    Any help would be appreciated!

    Uggg....
    Found the answer after I realized I was looking at the wrong SDK (5.0 instead of 6.0)
    I'm using the doc.hyperlinkPageItemSources property to get these images. It also looks like you can get the image data merge fields from DataMergeImagePlaceholder (but rememeber I couldn't access this).

  • [JS OSX problem executing CS3 script in CS4 ]

    I created a program in CS3 for hyperlink. Following code will work fine in CS3. But when i am trying to run this program in CS4 its not giving me any error but i am not getting  expected output.
    var myTextFrame_np = mydoc.pages.item(i).textFrames.add();
    myTextFrame_np.geometricBounds = ["38p0", "26p0", "40p0", "30p0"];
    var source_np = mydoc.hyperlinkPageItemSources.add(myTextFrame_np,{name:'P1:P2'});
    var dest_np = mydoc.hyperlinkExternalPageDestinations.add();
    dest_np.documentPath = myfile;
    dest_np.destinationPageIndex = 2;
    dest_np.viewSetting = HyperlinkDestinationPageSetting.fitWindow;
    mydoc.hyperlinks.add(source_np, dest_np, {visible:false, name:'P1:P2'});
    Can anyone tell me what i need to change in this program to work in CS4.
    Thank you,
    --Amit

    I created a test case for you. Copy the code into ESTK and run for CS4. I am sending Amit.indd file as well in your mail box please check the attachment. You can check now what is the problem. 
    var file_path = "/Users/amitvyawahare/Desktop/Amit.indd";
    var OpenDocument = app.open(File(file_path));
    myDoc = app.activeDocument;
    var myfile = File(file_path);
    var nextPage = ["38p5", "26p0", "40p0", "30p0"];  // Next Page text frame for hyperlink (y1, x1, y2, x2)
    var prevPage = ["38p5", "21p0", "40p0", "25p0"];  // Previous Page text frame for hyperlink (y1, x1, y2, x2)
    var myNextFrame = myDoc.pages.item(0).textFrames.add();
    myNextFrame.geometricBounds = [nextPage[0], nextPage[1], nextPage[2], nextPage[3]]; 
    var myNextSource = myDoc.hyperlinkPageItemSources.add(myNextFrame,{name:'P1:P2'});
    var myNextDest = myDoc.hyperlinkExternalPageDestinations.add();
    myNextDest.documentPath = myfile;
    myNextDest.destinationPageIndex = 2;
    myNextDest.viewSetting = HyperlinkDestinationPageSetting.fitWindow;
    myDoc.hyperlinks.add(myNextSource, myNextDest, {visible:false, name:'P1:P2'});
    When you finish execution try to open the showDestination it wount work.
    But  when you open P1:P2 hyperlink or try to open hyperlink option which is under hyperlinks.
    Then try to open showDestination that time it will work.
    --Amit

  • [JS Mac OS X CS3 to CS4]

    I created a program in CS3 for hyperlink. Following code will work fine in CS3. But when i am trying to run this program in CS4 its not giving me any error but i am not getting  expected output.
    var myTextFrame_np = mydoc.pages.item(i).textFrames.add();
    myTextFrame_np.geometricBounds = ["38p0", "26p0", "40p0", "30p0"];
    var source_np = mydoc.hyperlinkPageItemSources.add(myTextFrame_np,{name:'P1:P2'});
    var dest_np = mydoc.hyperlinkExternalPageDestinations.add();
    dest_np.documentPath = myfile;
    dest_np.destinationPageIndex = 2;
    dest_np.viewSetting = HyperlinkDestinationPageSetting.fitWindow;
    mydoc.hyperlinks.add(source_np, dest_np, {visible:false, name:'P1:P2'});
    Can anyone tell me what i need to change in this program to work in CS4.
    Thank you,
    --Amit

    Presently the Intel version of OS X is only available as the distribution DVD that came with your Intel Mac. You cannot boot an Intel Mac using the retail distribution of Tiger nor can you boot a PowerPC Mac with the Intel version of Tiger.
    Also, Intel Macs require a different partition scheme than PowerPC Macs. In order to boot an Intel Mac a hard drive must be partitioned using the GUID partition scheme (an option in the Intel version of Disk Utility.)
    Although this is purely a guess at this point, I would expect that the next revision of OS X, Leopard, will be made available both in PowerPC and Intel versions (and perhaps may even be a universal binary release.) However, this is purely speculative on my part.

  • [VB CS5] Adding buttons with page hyperlinks (hyperlinkpagedestinations)

    Hi people.
    I'm trying to add buttons with a script that link to pages.
    I have got this far but the documentation is sparse and i can't find a solution.
    My code so far
    REM====Initiliasing
    Set myInDesign = CreateObject("InDesign.Application")
    Set myDocument = myInDesign.Documents.Item(1)
    Set myPage = myDocument.Pages.Item(1)
    REM====Adding the button
    Set but = myDocument.Pages.Item(1).Buttons.Add
    but.GeometricBounds = Array(0,0,25,25)
    but.select()
    REM==== Adding the hyperlink
    set my_hyperlink = myDocument.hyperlinkPageDestinations.add(myDocument.Pages.Item(232))
    Creates the button ok, seems to create the hyperlink ok. That hyperlink should go to page 232.
    How do you add the hyperlink to the button so the button goes to page 232 when clicked?

    Ok i'm just going to go ahead and answer my own question.
    Seems you can't add it to a button but can add the hyperlink to a rectangle and it works.
    So the correct code looks like this
    Set myInDesign = CreateObject("InDesign.Application")
    Set myDocument = myInDesign.Documents.Item(1)
    Set myPage = myDocument.Pages.Item(1)
    Set oImageRect = myDocument.Pages.Item(1).Rectangles.add
    oImageRect.GeometricBounds = Array(50,0,25,25)
    set my_hyperlinkPAGE=myDocument.hyperlinkPageDestinations.add(myDocument.Pages.Item(5))
    Set my_hyperlinkSource = myDocument.HyperlinkPageItemSources.Add(oImageRect)
    set myHyperlink = myDocument.Hyperlinks.Add(my_hyperlinkSource, my_hyperlinkPAGE)
    Voila, goes to page 5!

  • Hyperlink on images???

    Is there really no way to add an hyperlink to images in Pages? Seems icredible that all there is are workarounds to do this.
    Please help.
    Mark

    Laubender wrote:
    I wanted to point out and asking, if you made sure a proper Destination for hyperlinks were created by testing this part of your code and looking up the Destination in the GUI.
    Uwe
    I can't test the GUI since the code never gets past the line
    Dim myHyperlinkSource = aDoc.HyperlinkPageItemSources.Add(rect)
    That said, the URLs work fine if I place them in separate cells. I'm pretty sure that the problem is simply the choice of objects here, but I can't figure it out.

  • Script not finding hyperlink source

    Extract to epub fails on hyperlinks and I have a problem trying to find and get rid of them. The hyperlinks only show up in story editor. I made a two page test ID file to narrow the problem. It has one of the problem hyperlinks and I can't find it with a script. I'm using a script mentioned in another hyperlink post http://forums.adobe.com/message/4629362#4629362
    The script is:
    objHyperLinks = app.activeDocument.hyperlinks;
    for (i=0; i<objHyperLinks.length; i++)
              if (objHyperLinks[i].source instanceof HyperlinkPageItemSource)
                        alert (objHyperLinks[i].source.sourcePageItem.id);
                alert('Hello World');
    I have the ID source, the script source, and an image of the entire story in story editor out in Dropbox at:
    https://www.dropbox.com/s/octqiftupzkfoiv/IndesignTestFile6.zip
    I'm on win xp, id 5.5
    Any help would be greatly appreciated. I'm brand new to indesign scripts so still working on getting to square one.

    The -sourcepath option takes a path ending in a directory. It should not
    contain "*.java" or any other file pattern. And it supplies the path to the
    root directory of the package directories, not directories contain source files.
    (I think it should have been named "packagepath".) It is mostly ignored\
    when passing in source filenames (like *.java).
    So try replacing this:
    -sourcepath .\com\SteveSystems\People\*.java
    with this:
    .\com\SteveSystems\People\*.java
    -Doug

Maybe you are looking for

  • How to supress a warning message in BDC for ME11 Tcode

    Hi Expert, I am doing a BDC report for ME11 Tcode and some of warning is ignorable for this transaction code,how can we suppress these warning through BDC program, is it possible or will have to make some changes changes in TCODE(ME11) itself.

  • MacBook no longer connects to T.V. after Thunderbolt 1.2 update

    I recieved a 13 inch, mid 2012 MacBook Pro for my birthday on Dec. 20th 2013. A few days later I bought a Nexxtech Mini DisplayPort to HDMI adaptor which was working fantastically for a couple weeks when connecting my MacBook to my Insignia TV. After

  • After Effects error: Failed to connect to Adobe Premiere Pro Dynamic Link (86 :: 1)

    When I try to open a project in After Effects I get his error message. Media is stored on a 8TB Raid 10 NAS connected with a Gigabit router.  The NAS is on my desk connected directly to my computer through the router. Computer Specs Adobe CC Windows

  • IPhone sending message as imessage instead of SMS to Nokia

    My wife has switched to a Nokia Lumia and given me her old iphone 4. The iPhone has been unlocked and resynced and everything has switched over successfully, The only issue is that, when I try to send her a text, my iPhone (her old iPhone) tries to s

  • Suggestion for next vision box

    Hi, just a thought for the mods if they are able to feedback by any channels about any next gen box... Lots of people have suggested freeview hd Capabilities, which would be great... I think that it would be great if the box could have wifi capabilit