0 Replies Latest reply on Aug 29, 2012 4:07 AM by Bill joy

    Create bookmark using java script

    Bill joy Level 1

      Hi

      can any one tell me how create bookmark using java script ?

      I want to create a bookmark on a Billjoy, there is a problem in parameter of  bookmarks.Add() function.

       

       

      INDESIGN::_Application oApplication;

      INDESIGN::Document objDoc;

      objDoc=oApplication.GetActiveDocument();

      INDESIGN::Pages pages= objDoc.GetPages();

      INDESIGN::Page  page =pages.GetItem(COleVariant((long)1));

      INDESIGN::TextFrames TextFrames =page.GetTextFrames();

      INDESIGN::TextFrame TextFrame = TextFrames.Add(covOptional,(long)1433299822,covOptional);

      TextFrame.SetContents(COleVariant(L"Billjoy"));

       

      // i want to create bookmark on billjoy

       

      INDESIGN::Bookmarks bookmarks = objDoc.GetBookmarks();

      bookmarks.Add(

       

      Parameters is destination of type  HyperlinkExternalPageDestination or HyperlinklPageDestination or

      HyperlinklTextDestination or Page.

       

      How use these type of parameter.

       

      Thanks.