Skip to main content
ad_ind38716857
Known Participant
February 7, 2015
Question

how to make xml tag for tables in indesign using applescript?

  • February 7, 2015
  • 1 reply
  • 1273 views

Hi guys,

           I need to make xml tag for tables in indesign using applescript language. Please help me.

This topic has been closed for replies.

1 reply

ad_ind38716857
Known Participant
February 7, 2015

The above question of my coding and this coding got an error for can't get markup tag of table 1 of active document.

What's wrong in my coding please tell me.

tell application "Adobe InDesign CC 2014"

    tell active document

        tell text frame 1    ---- i have 1 text frame

            tell table 1    ---- i have 1 table

                select

                set tag_name to markup tag of XML element 1 of item 1 of selection

            end tell

        end tell

    end tell

end tell

Loic.Aigon
Legend
February 7, 2015

Are you sure your table is tagged ?

This code seems to retrieve the tag name if any applied for this table :

tell application "Adobe InDesign CS5.5"

  tell active document

  if (count of text frames) > 0 then

  tell text frame 1

  if (count of tables) > 0 then

  tell table 1

  set xe to associated XML element

  if (xe = nothing) then

  display dialog ("This table has no taggings applied")

  else

  set mt to markup tag of xe

  set n to name of mt

  display dialog ("Tag name is " & n)

  end if

  end tell

  end if

  end tell

  end if

  end tell

end tell

HTH

Loic

http://www.ozalto.com

ad_ind38716857
Known Participant
February 9, 2015

Thank you  for your reply