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?
            agomez-s

            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.
                    'Console.WriteLine(equipo.AssignmentFileStatus)

             

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

             

                            Console.WriteLine("Viva lo encontré")

             

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

             

                            Exit For

             

                        End If
                    Next
                    '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)
                                myMenuAction.Invoke()
                            End If
                        End If

             

                    Next