8 Replies Latest reply: Nov 27, 2017 2:13 PM by Tamil arasu RSS

    mid functon in macro

    souad ouertani

      I used this script to export straight table with each selection date_s(yyyy/mm)

      Si have to store each file qvd with this  ruls "straight"num_month .qvd

      So i used this funtion NAMEFILE=Instr(String,6,2) to extract th month like MID() FUNTION

      eg: 2017/10  title=10


      set val=ActiveDocument.Fields("date_s").GetPossibleValues

      for i=0 to val.Count-1

      ActiveDocument.Fields("date_s").Select (val.Item(i).Text)

      set obj = ActiveDocument.GetSheetObject("CH173")

      set String=(val.Item(i).Text)


          obj.ExportEx "C:\Users\04488\Desktop\Vision\straight"& NAMEFILE & ".qvd",4


      but i have error Object required: '[string: "12/2015"]'