2 Replies Latest reply on Oct 13, 2010 7:39 AM by agomez-s

    How to assign textframes to assignment?

    AYS. HAKKIM Level 1

      Hi All


      How can we assign textframes/graphics to an specific assignment using javascript?

        • 1. Re: How to assign textframes to assignment?
          AYS. HAKKIM Level 1

          thanks all. I solved it myself.

          • 2. Re: How to assign textframes to assignment?

            Can you teach me


            I try this but dont work:


                    myAllPageItems = miDocumento.Pages.Item(1).AllPageItems
                    programas = miDocumento.Assignments
                    equipo = programas.Add("C:\Borrar\nota_principal.icma", , True)
                    equipo.Name = "Aleluya"
                    equipo.UserName = "Albondigón"


                    ' Permite identificar si el archivo de asignación está actualizado o no, o perdido según sea el caso.


                    For Each algo In myAllPageItems
                        myType = TypeName(algo)
                        If myType = "TextFrame" Then


                            Console.WriteLine("Viva lo encontré")


                            cajatexto = algo
                            cajatexto.Export(InDesign.idExportFormat.idInCopyMarkup, "C:\Borrar\Nota_Principal.icml")


                            Exit For


                        End If
                    'Dim myTypeMenu As InDesign.MenuElement
                    myMainMenu = myInDesign.Menus.Item("Main")
                    myTypeMenu = myMainMenu.MenuElements.Item("Edición")
                    myInCopyMenu = myTypeMenu.MenuElements.Item("InCopy")
                    myAsignacionMenu = myInCopyMenu.menuelements.Item("Añadir selección a asignación")


                    'Dim myMenuAction As InDesign.MenuAction


                    For intI = 1 To myAsignacionMenu.MenuElements.Count() ' myInDesign.Menus.Count '
                        myTypeMenu = myAsignacionMenu.MenuElements.Item(intI)  'myInDesign.Menus.Item(intI)
                        If TypeName(myTypeMenu) <> "MenuSeparator" Then
                            If myTypeMenu.name = "Aleluya" Then
                                myMenuAction = myInDesign.MenuActions.Item(myTypeMenu.Name)
                            End If
                        End If