text: XMP - Add keywords with scriptalexanderklapfer Jun 1, 2012 1:49 AM
  Hallo Forum,
  I would create a script to have keyword standards.
  In EXCEL i create a controlled namespace trougth comboboxes to save the files in an controlled way. The Metadata should be a controlled way to avoid "phantasie"-names. Having this values I would insert this strings in the XMP:KEYWORD field. In this way with the bridge I can retrive the information.
  xmp.string = word1, word2, word3, ...
  I use VBA and at the moment I have this but it doesn't work.
  Sub meta_add ()
  dim w1 as string
  w1 = "hallo world"
  document.xmpString.add.w1
  end sub
  Somebody can help me with the basic? JAVA would be welcomed too !!!
  Thank you
  1. Re: XMP - Add keywords with scriptMuppet Mark Jun 1, 2012 7:38 AM (in response to alexanderklapfer)
  For javascript you can load the external library object for use inside your Illustrator script… I would script the adding of this data in the Bridge app… Where you can find example scripts by Paul Riggot that add keywords to metadata…
  2. Re: XMP - Add keywords with scriptalexanderklapfer Jun 6, 2012 12:08 AM (in response to Muppet Mark)
  3. Re: XMP - Add keywords with scriptMuppet Mark Jun 6, 2012 3:43 AM (in response to alexanderklapfer)
  Then Im definatly the wrong person to ask… I use AppleScript & ExtendScript ( on a mac you see ). Like I said it is possible in AI & BR to do this but I wouldn't have a clue if VB has any XMP libraries/tools to do so… BR is pretty much ExtendScript only… Carlos may well know he does VB as well…
  4. Re: XMP - Add keywords with scriptmoluapple Jun 6, 2012 6:57 AM (in response to alexanderklapfer)
  Document's XMPString property is r/w, so simply write you keywords into. JS code:
  activeDocument.XMPString = activeDocument.XMPString.replace(' </dc:title>', ''' </dc:title> <dc:subject> <rdf:Bag> <rdf:li>some text</rdf:li> <rdf:li>keywords for me</rdf:li> </rdf:Bag> </dc:subject>'''); activeDocument.save();
  Note: VBS has DoJavaScript function, right?
  5. Re: XMP - Add keywords with scriptalexanderklapfer Jun 6, 2012 7:38 AM (in response to moluapple)
  I think that I have a problem with the synthax after (' is this right ? It doesn't work
  My problem is that my macro should create a stringchain like: keyword1, keyword2, keyword5, keyword9
  The aim is a controlled namespace to avoid phantasienames and clear metadata ... may you have a suggestion how I can do this ?
  Anyway thank you and many many thanks for your reply!
  6. Re: XMP - Add keywords with scriptaklyman Jun 6, 2012 5:32 PM (in response to alexanderklapfer)
  The FileInfo SDK has a lot of useful information about creating a custom FileInfo panel (from your File Menu in most Adobe products) where you can create a custom interface for creating your own XMP data. You can get pretty involved with just the sample CustomFileInfo panel that's provided.... I went further and created a Flash SWF to use as the interface (built using Flex, Actionscript, and Ant), which included checkboxes that when selected wrote to the keyword field. Might be more than you are looking for though.
  Either way, the Custom FileInfo Panel SDK would be where I'd start.