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){

Similar Messages

  • How-to handle dynamically created AppModules with JUApplication, JUMetaobjectManager

    Hi,
    I've got a JClient App, where I want to dynamically create AppModules in the Context of the RootAppModule.
    How can I best do this??? The problem is that I can't really use the JUMetaObjectManager.createApplicationObject method and hence I can't use PanelBindings.....well I can't use the JClient Framework.
    Is there a way to elegantly manage this issue??
    Every solution would be very appreciated! thanks.

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • How do I create a pdf in Indesign with 40 file hyperlinks so it can be used on different computers?

    I am creating a document in Indesign CS4 that is to be exported as a pdf.
    Within this one page document, there are approximately 40 listed products, one after the other and each product has been set up to hyperlink to a specific pdf in the same directory.
    This has been no problem.
    Where the problem is, is that it won't work on other computers because it seems to 'hardwire' the hyperlink file address.
    I then went in and set up the hyperlink as a URL.  This worked on any computer, but then the pdf opens in an internet browser.
    I NEED THE LINKED PDF TO OPEN IN ADOBE READER.
    I then opened the one page pdf in Adobe Acrobat Pro.  It brought over no hyperlinks.  So I created the hyperlinks there.  No probs.  It worked.  But if I want to update this one page doc in the future, I'm going to have to create all links again.  I have other docs that I need to create that have hundreds of links.
    Can anyone shed some light on this?  It shouldn't be difficult.  Why won't a linked file just work on any computer?
    Your help will be greatly appreciate.
    Josh

    Josh,
    Got your email with added question related to this user to user forum post. As others might have the same question, answering it here.
    If you want to point to PDFs that are in a subfolder of the root-directory that holds the pdf containing all the links, you'd need to add the subfolder to the path-specification for the link..
    For example:
    root-folder has 'source.pdf' that has a link going to 'desitnation.pdf'
    a 'subfolder' contains 'desitnation.pdf'
    Link path would be '/subfolder/destination.pdf'
    Cheers,
    Cari
    www.twitter.com/carijansen

  • How to delete Dynamically created input field UI Element

    Hi all,
              I want to delete dynamically created input field and label.
    Is there any method please tell.
    Thanks in advance
    Hemalatha

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

  • How do I dynamically  create a pdk:text / field?!!!!!!

    I have a form that is to let the user add multiple rows and I need to be able to dynamically create a text filed and assign the attributes maxlength, size, name,property, and also assign the onkeypress a java script function. the following code will get me a text box but none of the attributes work:
    function add_Row(TLBID)
    var tbody = document.getElementById(TLBID).getElementsByTagName("TBODY")[0];
    var row = document.createElement("TR");
    var tlbTD = document.createElement("TD");
    var txtelement = document.createElement("TEXTAREA");
    tlbTD.colSpan = 2;
    txtelement.cols="25";
    txtelement.rows="2";
    txtelement.name="newDCTResponseText";
    tlbTD.appendChild(txtelement);
    var tlbTD2 = document.createElement("TD");
    tlbTD2.valign="bottom";
    var txtelement2 = document.createElement("input");
    txtelement2.type="text";
    txtelement2.maxlength="5";
    txtelement2.size="2";
    txtelement2.name="dctqeBean";
    txtelement2.property="dctScoreTxtBox";
    txtelement2.onkeypress="do_validate()";
    tlbTD2.appendChild(txtelement2);
    row.appendChild(tlbTD);
    row.appendChild(tlbTD2);
    tbody.appendChild(row);
    }

    Hi Ray,
    Thanks for your response. I do not understand the explanation. Maybe it is because I did not explain what I need or maybe becasue I am new to TS. Here's what I'd like to do.
    Have a predefined list of IO names. Like:
    Nest1 
    K23    "DIO96/port0/line1"
    K24    "DIO96/port0/line2"
    Nest2
    K23    "DIO96/port1/line1"
    K24    "DIO96/port1/line2"
    I will have 2 nests(sockets) in my system running batch model. From what I understand I can have 1 sequence defined and TS that will execute 2 threads with 1 socket per thread. In this sequence I somehow need to pass to my VI the value of K23 which is different for socket1 and 2. I was thinking that I can somehow create the Property Name Dynamically. Sort of like that:
    RunState.Sequence.Parameters.GetPropertyObject("Nest%d",RunState.TestSockets.MyIndex+1).K23
    It would give the sequence running for socket 1 the value "DIO96/port0/line1" and "DIO96/port1/line1" for socket 2
    thanks
    J.

  • How to handle dynamically created checkboxes in JSP???

    Hello everybody,
    In a JSP page I would like to create checkbox dynamically on every
    result line (detail line), then check in some of them and finally pass the checked lines to a JSP bean which will handle them on a submit button press.
    The problem are:
    - how to index every checkbox in jsp result line in jsp page in order to avoid solutions like this:
    <input type=checkbox" name="value1">
    <input type=checkbox" name="value2">
    etc
    - how to read every checkbox to find the checked ones
    Is there anobody who has any experience from case like this?
    Please, help me.
    Best regards,
    Danny

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • How to run dynamically created jnlp?

    Hi,
    I'm learning how to run a dynamic jnlp file create by a cgi program.
    I have a jnlp file, which can be executed by the in the
    HTML file. Then my experiment is to write a perl script to print
    exactly the same content as the jnlp file, and then the href is
    re-directed to the cgi. But Then I got an error complaining
    the first line:
    Bad header = <?xml version="1.0+" .... ?>Is there anything else I should add in the header?
    Thanks.

    To be more specific about my question, here is the perl script I used
    to generate the jnlp file. What should I add to it?
    Thanks.
    #!/usr/bin/perl
    use CGI;
    ## Read parameters
    $query = new CGI;
    $SecID    = $query->param("SECID");
    $PlayName = $query->param("PlayName");
    $PlayFile = $query->param("PlayFile");
    $PlayFrom = $query->param("PlayFrom");
    $PlayTo   = $query->param("PlayTo");
    $CodeBase = $query->param("CodeBase");
    # Generating jnlp
    print "Content-Type: application/x-java-jnlp-file \n";
    #print '<%page contentType="application/x-java-jnlp-file" %>'."\n";
    print '<?xml version="1.0" encoding="utf-8"?>'."\n";
    print "<jnlp spec=\"1.0+\"  codebase= \"$CodeBase\" />\n";
    print "  <information> \n";
    print "    <title> $PlayName </title> ";
    print "    <vender>  </vender> \n";
    print "    <description> </description>
    print "    <offline-allowed/>
    print "  </information> \n";
    print "  <security>\n";
    print "     <all-permissions> \n";
    print "  </security>\n";
    print "  <resource>\n";
    print '     <jar href="Java/Piano/MidiBox.jar" />'."\n";
    print '     <j2se version="1.2+"
    href="http://java.sun.com/products/autodl/j2se"/> '."\n";
    print "  </resource>\n";
    print '  <application-desc main-class="eng.midi.MidiBoxGUI">'."\n";
    print "     <argument>-px</argument> \n";
    print "     <argument>-Ud</argument> \n";
    print "     <argument>$PlayFile</argument> \n";
    if ($PlayFrom)
    print "     <argument>-from $PlayFrom </argument> \n";
    if ($playTo)
    print "     <argument>-to $PlayTo </argument> \n";
    print "  </application-desc> \n";
    print "</jnlp> \n";

  • How to show dynamically created popup from created command button?

    In my region I have a toolbar. The buttons in the toolbar are created dynamically in the bean. When one of the buttons is clicked I’d like to display a popup dialog.
    So, the code looks something like this:
    RichCommandToolbarButton button = new RichCommandToolbarButton();
    // set icons, text, etc….
    RichPopup popup = new RichPopup();
    // set id etc.
    RichDialog dialog = new RichDialog();
    dialog.setType(“cancel”);
    // add title, text, another button to toolbar, etc.
    popup.getChildren().add ( dialog);
    ClientListenerSet set = button.getClientListeners();
    if (set == null)
    set = new ClientListenerSet();
    button.setClientListeners(set);
    set.addFeatureDependency("AdfShowPopupBehavior");
    set.addBehavior("new AdfShowPopupBehavior('" + popup.getId() + "', AdfRichPopup.ALIGN_AFTER_END,null,'action')");
    button.setPopup(popup);
    In the corresponding .jsff the toolbar and the buttons are rendered in the following way:
    <af:toolbar id="t1" styleClass="AFStretchWidth"
    visible="#{backingBeanScope.MyBean.visible}" >
    <af:forEach items="#{backingBeanScope.MyBean.buttons}" var="adfButton" >
    <af:commandToolbarButton binding="#{adfButton}" />
    </af:forEach>
    This kind of works, except the button shows up with the down-arrow menu icon, which when clicked shows a tiny empty rectangle/menu. When the button itself is clicked, it correctly shows the popup with the dialog.
    So… how do I do this w/o doing the button.setPopup() so that I do not get the empty menu, but just get the popup to show when the button is clicked? Or is there a way to disable showing of the (empty) menu?
    I have tried adding the popup to the toolbar, but that did not work.
    I have tried adding action listener to the button, and adding the popup to the toolbar there and then showing it (by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    I have tried adding action listener to the button, and adding the popup to the button getChildren().add() then showing it ((by doing new RichPopup.PopupHints(); popup.show(ph)), but that did not work.
    ANY help will be most appreciated!

    Hi,
    Do u mean to say that u need to open another PLD in when ur user form is open.?
    Please provide more information.
    Thanks,
    Vasu Natari.

  • How can I dynamically create all kinds of items in runtime?

    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?
    null

    You can't.
    You should use another tool like JAVA or C.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by gang lee ([email protected]):
    sir:
    I always want to create items dynamically with forms50 in
    runtimes,But I found that items ,eg:text item,list item were
    be created in design time,it make me limited,I hope to control
    item freely,how can I do?<HR></BLOCKQUOTE>
    null

  • How to delete dynamically created attribute

    Hi,
      I am creating table dynamically according to no of columns. first time its displaying correctly, second time once i changed the no of columns its throwing error message like:
    com.sap.tc.webdynpro.progmodel.context.ContextException: DataNodeInfo(DynamicView.TableNode): duplicate name for attribute name0.
    Everytime before creating table i tried  following commands.
    table.removeAllColumns();
    but still i am getting error.
    Help me out in this....
    Regards
    Suresh KB

    hi suresh
    table.removeAllColumns();
    will remove all the columns from the view.
    but when u create the context attributes they are already existing. So it is giving the duplicate context exception.
    To solve this problem, first delete all the attributes created dynamically. using below code.
    wdcontext.node<urnode>().reset(<b>False</b>).
    it will delete all the attrbutes created at runtime.
    to delete attrbutes created at designtime use.
    wdcontext.node<urnode>().reset(<b>True</b>).
    Regards
    Brahmanandam.A
    collections created at design time will be preserved.  All dynamically
    added nodes and attributes are destroyed from the metadata.<p>
    Calling reset(true) is functionally equivalent to calling reset().<p>

  • How to execute dynamically created procedure with out parameter

    hi guys ,
    friend i have to execute a procedure whose name is going to change dynamically and this procedure is have 2 out parameter . I need to capture value of these 2 output parameter, here i m giving my code also ..
    declare
    v_emp_id int :=100013 ;
    p_reg_off varchar(5) := 'R' ;
    p_user_id int := 6 ;
    v_status varchar(200);
    v_message varchar (200);
    v_Formula varchar(100);
    v_number int := 1 ;
    begin
    v_Formula := 'Call testsp_'||v_number||'('||v_emp_id||','''||p_reg_off||''','|| p_user_id || ',v_status,v_message)' ;
    DBMS_OUTPUT.PUT_LINE( v_Formula);
    execute immediate v_Formula;
    end ;
    and my procedure structure is like this
    CREATE OR REPLACE PROCEDURE testsp_1
    p_emp_id INT,
    p_reg_off CHAR,
    p_user_id INT,
    p_status OUT NOCOPY INT,
    p_message OUT NOCOPY VARCHAR2
    AS
    begin
    end ;
    please help me .....

    The Complete Syntax for Execute Immediate is ::
    EXECUTE IMMEDIATE dynamic_sql_string
    [INTO {define_variable,... | INTO record_name}]
    [USING
    IN bind_argument,...]
    [RETURN[ING] INTO
    bind_argument,...];
    i think now it won't be a problem! ;)

  • How to bind dynamically created attributes

    Hi all,
    i hv created an appl where all the attributes hv been created dynamically..
    wdContext.getNodeInfo().addAttribute("From","ddic:com.sap.dictionary.string");
        wdContext.getNodeInfo().addAttribute("To","ddic:com.sap.dictionary.string");
        wdContext.getNodeInfo().addAttribute("Subject","ddic:com.sap.dictionary.string");
        wdContext.getNodeInfo().addAttribute("Message","ddic:com.sap.dictionary.string");
    bt nw i am nt able to retrieve those.
    For ex: if i hv to set the from field to null ,hw to do so?
    (   As we used  to get it:
      wdcontext.currentContextElement().setFrom(" ");
    Plz help.
    Thanks and Regards,
    Ankita
    Edited by: Ankita Padhi on Jul 14, 2008 8:48 AM

    Hi,
    here i m giving code for your reference of a dynamic checkbox:
    IWDCheckBox checkBox =
    (IWDCheckBox) view.createElement(IWDCheckBox.class,
                                  "checkBox" + count);
    IWDMatrixHeadData checkHeadData =
    (IWDMatrixHeadData) checkBox.createLayoutData(
                                  IWDMatrixHeadData.class);
    IWDAttributeInfo attrInfo;
    info=               wdContext.nodeCheckBox().getNodeInfo().addAttribute(
         "Check" + count,          "ddic:com.sap.dictionary.boolean");
                        checkHeadData.setVAlign(WDCellVAlign.TOP);
    checkHeadData.setWidth("6%");
    checkHeadData.setColSpan(1);
    this line used to bind the context to the element:-
    checkBox.bindChecked(info);
    checkBox.setEnabled(true);
    TitleRow.addChild(checkBox);
    Hope this may help you.
    Regards,
    Deepak
    Edited by: Deepak Arora on Jul 14, 2008 9:09 AM

  • How to dynamically create a table to join with

    I have a table of users and when they should submit time sheets: start date and end date.
    I have a table of timesheets with user ID and week-ending date.
    I need to construct a report of which timesheets are missing this year.
    I effectively need a table of week-ending dates for the year to join with the user and table and filter on start/end dates - and derive a list of week-ending dates for which I expect to see timesheets.
    But I donu2019t have write-access to the database: Can I effectively create a local table with the week-ending dates for the year?
    We currently solve it by using a local Excel file. Is that the most efficient way? It is also a nuisance as we have to edit the report and copy the excel file when we move directories.
    2nd question on the forum
    Mike

    Mikecro,
    Trying to actually write a SQL script of any complexity in the Command window itself is a horrible experience. I'd recommend writing your SQL in SSMS and testing it there. Once you have the script written in SSMS and it producing the desired result set you can then copy and paste it into the CR Command. (Just use hard coded dummy parameters in SSMS and replace them once they're pasted into the command.)
    If you are building "canned" reports that will ship with a software package, I'd recommend building it out as a stored procedure (and the same with any other reports). This will also make future support much easier by allowing you to make any modifications to the data set directly on the SQL Server without having to touch CR or CRS.
    If you're acting as a 3rd party consultant and you don't have the access or authority to add SP objects to the SQL Server then sticking with the Command is going to be your best bet. This is still better than using linked tables IMO.
    #1) CR simply lacks the ability to write SQL with any real level of complexity. It can't even create a simple sub-query.
    #2) It looks more professional. From an end users pov a report that uses a sql command, as opposed to linked table, demonstrates that the report developer is of a more advance skill level.
    #3) Most of your clients won't know how to write SQL themselves so they will need to re-engage your services to take care of any existing reports and to build new ones. It's easier to get repeat business than it is to get new business.
    As you've already seen, getting everything into a single, well written, SQL command can make a dramatic improvement in report performance. If you get in the habit of building all of your reports using SPs, Views or Commands, you'll quickly come to appreciate added flexibility it affords you. Once to modify your report building workflows to accommodate the change, you won't even think about going back.
    HTH,
    Jason

  • How to handle dynamically created row values when get upadted "please help"

    Hi,
    In my application I have requirement to display the data for specific date when user clicks on viewData. (it shows the entries for that specific days . There may be number of entries). For showing this I have created Value Object and I am setting all the entries for particular selection date to value object and (simply one day entry indicates one instance of my VO if there are 10 entries then I am creating 10 instances of VO and passing this to the actionfor)
    On my JSP page I am displaying that data by using <logic:iterate>
    <logic:iterate id=�myid� name =�nameofform� property =�Listproperty�>
    <tr>
    <td><input type=�text� property=�abc� value=<bean:write name=�myid� property=�propertyinVO�></td>
    // and same for other other values as well
    �.
    </logic:itearte>
    Now I have requirement that if user edit these entries and click on SAVEDATA the updated values should go to the DB.
    As I don�t have property mapped separately I am not able to take updated values of those as they are getting dynamically generated
    Is there is any way by which I can get these updated values.
    I am in badly need of that . Urgent help will highly appreciated.
    Thanks
    Sheena

    Hi, first off, no need to determine what has been checked or not. If the checkbox is checked, on the post, the value will be submitted as part of the request. If the checkbox is not checked, it will not be submitted (it's value will be null). Depending on what you need, I have approached this a number of different ways. One way is to name all checkboxes the same name. If you need to distinguish between two rows in the form, then in the value field for the checkbox, use some type of distinguishing factor, for example,
    <input type=checkbox name=chkName value="1:abc">
    <input type=checkbox name=chkName value="1:def">
    Now, you only have to make one call on the Servlet/JSP receiving the form post, request.getParameterValues("chkName") which will return an array of the non-null Strings that were checked.

  • How to delete dynamically created nodes?

    Hello Colleagues,
    In our screen we have a push button which adds one node to the context when used. The node is having a few fields which are shown in the UI.
    So as you keep on pressing the button, additional rows will be appended on the screen.
    Now, I have added another button on each of these rows. On clicking of which it should remove the row (the node). So each time you press the button 'Add element', additional rows will be appended, and each row will have a button 'Remove Element'.
    But, the problem I am facing is in the implementation of 'Remove Element'.
    The button 'Remove Element' is mapped to an action. But since there are as many 'Remove Element' buttons as there are rows, how do I identify which node is to be deleted ?
    I have tried with get lead selection etc. but it didnt work.
    Is there any way we can find out which UI element has trigerred the deletion, in the code of 'onactionSOMETHING' ?
    Thanks
    Gagan

    Hi,
    In the WDEVENT parameter of the action handler you can find the event id.
    ***Variables
      DATA:
        lv_selected  type string.          "Selected tab value
    ***Structure and internal table for the Events and messages
      DATA:
        lt_events type WDR_EVENT_PARAMETER_LIST,
        ls_events type WDR_EVENT_PARAMETER.
    ***Field symbols
      field-symbols: <fs_value> type any.   "Attribute value in events table
    ***Move the event table to lt_events
      lt_events = wdevent->parameters.
      read table  lt_events into ls_events with key name = 'SAVE'.  "Button Id
      if sy-subrc eq 0.
        assign ls_events-value->* to <fs_value>.
        if sy-subrc eq 0.
          lv_selected  = <fs_value>.
        endif.                 "IF sy-subrc eq 0.
      endif.                 "IF sy-subrc eq 0.
    Regards,
    Lekha.

Maybe you are looking for