4 Replies Latest reply: Oct 24, 2017 3:04 AM by clive ketley RSS

    Set Date in field for macro

    clive ketley

      Hi,

      I am trying to create a macro that will output a HTML format table. I want the selection to include any records with a date 90 days ago or newer.

      While i can output the HTML table ok i cannot select the date range. I realise the macro has a fixed date which works fine but I need to include all dates from then to the present.

       

      My Macro is simply

       

      sub OnReload()

      ActiveDocument.Fields("AllocationDateAHR").select Date-90

      ActiveDocument.GetSheetObject("TB08").ExportHtml "\\san\Common\Allocations\Test.html"

      end sub

       

      I have tried set analysis in the above macro but it is not recognised.

       

      All suggestions welcome.

       

      Thanks

      Clive