10 Replies Latest reply on Apr 5, 2015 8:33 PM by sreekarthik.k@gmail.com

    indesign Notes

    Level 1

      How to find the notes and convert the same as Inline Text Frames or Achored Object.

       

      Please advice.

        • 1. Re: indesign Notes
          Laubender Adobe Community Professional & MVP

          How to find the notes?

          If there are any notes, you can store all notes in one array.

           

          Below an example with all notes of all stories of the active document.

          All code in ExtendScript (JavaScript).

           

          Important: Notes in footnotes and tables will not be assembled this way.

           

          var myAllNotesArray = app.documents[0].stories.everyItem().notes.everyItem().getElements();
          

           

          Then loop through that array.
          The storyOffset of a Note object is the insertionPoint of the text where the note is sitting.

           

          You could then:

          1. Add a textFrame to the found insertion point (the storyOffset of the note object) and set its anchoredObjectSettings on the fly.

          3. Duplicate the text of that note to the anchored text frame and format the text as you wish.

           

          Then you can remove all the notes in one go:

           

          app.documents[0].stories.everyItem().notes.everyitem().remove();
          

           

          Uwe

          • 2. Re: indesign Notes
            Level 1

            Its working for me but how to duplicate and move the content to anchor object

             

             

            here is my code

             

            var myAllNotesArray = app.documents[0].stories.everyItem().notes.everyItem().getElements(); 

            for(i=0; i<myAllNotesArray.length;i++){ 

                var myNotes = myAllNotesArray[i].storyOffset.insertionPoints[0].textFrames.add({geometricBounds:[0,0,5, 5]});  

                anchframe(myNotes,myNotes.geometricBounds)

                noteContents = myAllNotesArray[i].texts[0].contents.

               

                app.select(myNotes.insertionPoints[-1])

             

             

             

             

             

             

            }

             

             

             

             

            function anchframe(frame,myrectframe1)

            {

                    frame.anchoredObjectSettings.anchoredPosition=AnchorPosition.anchored;

                    frame.anchoredObjectSettings.horizontalReferencePoint = AnchoredRelativeTo.columnEdge;

                    frame.anchoredObjectSettings.anchorXoffset="5";

                    var myheigh=myrectframe1[2]-myrectframe1[0];

                    frame.anchoredObjectSettings.anchorYoffset=myheigh-6;

                    frame.anchoredObjectSettings.lockPosition=false;

                    frame.anchoredObjectSettings.spineRelative=true

            }

            • 3. Re: indesign Notes
              Laubender Adobe Community Professional & MVP

              No problem. The Text object has the method duplicate().
              The ideal target for duplicate() would be the first insertion point of your anchored text frame.

              The source is texts[0] of the Note object.

               

              If I look at your code, I can see, that your variable myNotes is in fact your anchored text frame.

              So you can do the following:

               

              myAllNotesArray[i].texts[0].duplicate(LocationOptions.AFTER,myNotes.parentStory.texts[0].insertionPoints[0]);
              

               

              Uwe

              • 4. Re: indesign Notes
                Level 1

                Thank you so much Laubender !

                It works perfectly.

                • 5. Re: indesign Notes
                  [Jongware] Most Valuable Participant

                  The only answer I can see in your history you ever marked as 'correct' is one of your own. Yet you acknowledge Uwe helped you out. Why is that?

                  • 6. Re: indesign Notes
                    Laubender Adobe Community Professional & MVP

                    @sreekarthik — Jongware was giving a subtle hint on the possibility to mark one of my answers as "correct" by you, the original poster.

                    You cannot do this by mail, I think. You have to go to the forum for this …

                     

                    And I think, you should do this. Mark one of my answers as "correct". I would recommend answer #1. Not to give me some imaginary points, but:

                    Just to give the whole thread a mark, that other scripters, that are helpful and looking for unresolved questions only, would not need to visit here.

                    Or that other scripters, who are plagued by the same question like you, visit here to see the resolved problem.

                    Maybe they would search for "correct" answers only.

                     

                    Uwe

                    • 7. Re: indesign Notes
                      Level 1

                      When i click the action button its show's no action available.

                       

                      How to mark the answer as a correct answer? Please advice.

                      Sorry for my inconvenience

                      • 8. Re: indesign Notes
                        Level 1

                        How can I mark something as 'helpful'  or 'the correct answer' ?

                        • 9. Re: indesign Notes
                          Laubender Adobe Community Professional & MVP

                          @sreekarthik – you have to log in the forum with your Adobe ID. I think, you cannot mark an answer as "Correct", if you like to do it from your "Inbox" or by mail.

                          But if you go straight to the thread when you are logged in, you should see a button, a green star labeled "Correct Answer", like that:

                           

                          ExampleOfCorrect-AdobeForums.png

                           

                           

                          Btw.: Only forum administrators can mark an answer "Helpful" or "Assumed Answered".

                           

                          Uwe

                          • 10. Re: indesign Notes
                            Level 1

                            thank you so much. It's done