0 Replies Latest reply: Nov 26, 2012 11:04 AM by Vladimir Komarov RSS

    Updating field names in MultiBox using Macro

    Vladimir Komarov

      Hello,

       

      I need to populate a MultiBox dynamically and update field names per pre-defined list.

       

      Any suggestions how to do it efficiently?

       

      Here is the sample macro:

       

      set MB = ActiveDocument.GetSheetObject("MB01")

       

      MB.AddField "mpt_id"

      MB.AddField "Project_Full_ELT"

       

       

      mbp = MB.GetProperties

      mbp.MemberAttributes.Item(0).Label.v = "Project ID"

      mbp.MemberAttributes.Item(0).SortCriteria.SortByState = true

       

       

      mbp.MemberAttributes.Item(1).Label.v = "Project ELT"

      mbp.MemberAttributes.Item(1).SortCriteria.SortByState = true

       

       

      MB.SetProperties mbp

       

       

      Is it possible to have table (similar to Mapping table approach) that I can use to AddFields and UpdateFieldLabels dynamically instead of "Hard-coded" version above?  

       

      I would appreciate any suggestions.

       

      Best regards,

      Vladimir