2 Replies Latest reply on Jul 22, 2009 2:09 AM by Set Screen name

    [VBS-CS3] Hit the syntaxis, pls...

    Set Screen name Level 1


      Set mIyndex  = myDoc.Index.Generate True, Array(mx, my) have red color - means: mistake syntaxis



      myDoc.Index.Generate True, Array(mx, my) says: object requires.


      How should i write index generating command?



        • 1. Re: [VBS-CS3] Hit the syntaxis, pls...
          Olav Martin Kvern Level 3

          Hi Set Screen Name,


          You need to provide the page on which you want to place the index story. It's the first parameter in the Generate method.


          To place the story without getting a reference to it:


          myIndex.Generate myDocument.Pages.Item(1), Array(200, 200)


          To place the story and get a reference to it (note that Generate returns an array that contains a single story):


          Set myIndexStory = myIndex.Generate(myDocument.Pages.Item(1), Array(200, 200)).Item(1)





          1 person found this helpful
          • 2. Re: [VBS-CS3] Hit the syntaxis, pls...
            Set Screen name Level 1

            "Set myIndexStory = myIndex.Generate(myDocument.Pages.Item(1), Array(200, 200)).Item(1)"


            To be accurate, this did work in this syntax

            Set myIndexStory = myDoc.Indexes.Item(1).Generate(myDocument.Pages.Item(1), Array(200, 200)).Item(1)



            Thanks very much!