1 Reply Latest reply on Dec 21, 2010 10:58 PM by Green4ever

    InDesignBookmarks

    RajGaikwad

      I am writhing below code for adding bookmarks in InDesign CS4

       

      BMNd.Texts(1).Select()

       

      Dim hd2 As InDesign.HyperlinkTextDestination

       

      Dim hdd2 As InDesign.HyperlinkTextDestinations = IndDoc.HyperlinkTextDestinations

       

      Dim indTD2 As InDesign.Text = BMNd.Texts(1)

      hd2 = hdd2.Add(indTD2)

       

      Dim BkName As String = indTD2.Contents

      BkName = RemoveJunk(BkName)

      hd2.Name = BkName

      myBookmark2 = myBookmark.Bookmarks.Add(hd2)

       

      But it is giving Exception as Name is already used

      but in my InDesign document there is no any bookmark present

      some times it is working fine

      please help me