3 Replies Latest reply on Nov 28, 2011 8:45 AM by carlmdobbs

    Relink and Update links in CS5 using VBA

    Econometric

      Hi everyone,

       

      Does anyone have a link to an online reference for VBA Scripting in CS5? Most of what I find online is for CS2. That said, I have a VBA script that is written for CS2 that goes through an InDesign document and relinks every link to a certain file path variable, then updates the link (code below). When I run this in CS5, the links do not update. I am not sure how to tell if it is the .Relink() function that is not working, or the .Update funtion that is not working because I do not receive any errors. It just doesn't update. Any help would be really great. Thank you so much!

       

      (this code works perfectly in CS2)

       

      Dim idLink

       

      For Each idLink In idDoc.Links

       

      idLink.Relink (pathvariable & idLink,Name)

      idLink.Update

       

      Next idLink

        • 1. Re: Relink and Update links in CS5 using VBA
          Econometric Level 1

          More details on this problem: The script goes through and updates the paths, but it is not until the file is saved/closed, and re-opened, that the paths show being changed, and then they can be updated. Is this some kind of error in CS5? This ability to automatically update links is important to my workflow so this is a critical issue for me that I cannot seem to solve.

          • 2. Re: Relink and Update links in CS5 using VBA
            Larry G. Schneider Adobe Community Professional & MVP

            In ExtendScript a method has to be invoked by placing a set of parens () behind it. I don't know VBA but it seems to me that the method Update is not being invoked properly.

            • 3. Re: Relink and Update links in CS5 using VBA
              carlmdobbs

              Robohelp has always had a problem. Their help instructions leave the user saying, "I asked a question and your answer is way too ambiguous to be meaningful." They talk about "breadcrumbs" as though you know what breadcrumbs are and can follow what they are saying. To me, "breadcrumbs" are crumbs left by brittle bread. They tell you how to make them without telling you how they look or what they are supposed to do.

              It is all over Robohelp. I had to look on Google to find out what a T.O.C. is because they don't say anywhere that it refers to the table of contents.

              Robohelp needs to follow this rule: Define a word before you use it. Otherwise no matter how you describe it, the description has no value.

              This is why they do things shoddily when talking about VBA. In VBA you have to have "Subs" and "Functions" before you have a place to put the script. In Robohelp they simply show you the lines of code without telling you how to make a sub routine or function. They don't tell you how to dim the variable in Robohelp. It doesn't work the same in Robohelp as it does in MS Access, MS Word or any other application that uses VBA.

              Robohelp is trying hard but the people who write things are not communicators. They are obfuscators.

              Now for those who need to learn VBA.  I teach it after work free.  contact me at carlmdobbs@gmail.com and I can share with you my 18 years of experience using it in MS Access, Word, Excel, Outlook and other applications.  However I can't tell you how to use it in Robohelp yet because they don't clue me in on it.  They break the rules.