0 Replies Latest reply: Oct 23, 2017 9:31 AM by wayne Cusworth RSS

    Evaluate a field in VBscript Macro to see if its Null

    wayne Cusworth



      i have a Macro using VBscript that exports data to a CSV, but i want to do an evaluation to determine in a field is null and if its null, don't export.


      Sub Export


      set sObject = ActiveDocument.GetSheetObject("CH05")

      File = ActiveDocument.Evaluate("'AR'  & '.csv'")

      sObject.Export "C:\Users\ThisUser\Desktop\"&File ,","

      End Sub


      i cannot determine whether the field is null at reload time as sometimes it will be null, and other times it will have data and is dependent on the select statement above, and i only want it to export if there is data associated with the selected field.


      I know i need to put in an IF statement for the evaluation, but just dont know what statement i need to enter.


      Any help would be great.