0 Replies Latest reply: Aug 31, 2017 9:20 AM by Aldo Valenti RSS

    Variable, inputfields and vbscript

    Aldo Valenti

      Goodmorning everyone,

      I did a macro that reads some imputfields, reload the data and exports some excel objects.

      The variable containing the date i will pass to the selections gives me some trouble. If the variable "today" is derived from an inputfield the variable is empty ...



      Here is the script:


      Sub Esporta

      path = ActiveDocument.Evaluate("pathXLS")

      ' oggi = Year(Date) & Month(Date) & Day(Date)

      oggi = ActiveDocument.Evaluate("oggi")


      R1 = path & oggi & "_Riepilogo1.xls"

      R2 = path & oggi & "_Riepilogo2.xls"

      R3 = path & oggi & "_Riepilogo3.xls"


      Set C1 = ActiveDocument.GetSheetObject("CH50")

      Set C2 = ActiveDocument.GetSheetObject("CH51")

      Set C3 = ActiveDocument.GetSheetObject("CH53")







      End Sub

      Thanks in advance for your reply