Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have coded a macro which clears all the selections and selects 1 year calendar dates. When I have coded below it is giving syntax error can I know what is the right way to incorporated condition in the macro
Sub SetClearState_Dashboard()
ActiveDocument.SetClearAll
v1.SetContent date()-365,true
ActiveDocument.Fields("calendar_date").Select ='>=' & DATE(ADDMONTHS(TODAY(),-12)) & '<=' & TODAY()
ActiveDocument.SetClearState
End Sub
Sub SetClearState_Dashboard()
ActiveDocument.SetClearAll
ActiveDocument.Fields("calendar_date").Select calendar_date>=date()-365 and calendar_date<=date()
ActiveDocument.SetClearState
End Sub
When I ran above fucntion it is giving below mentioned error:
Object doesn't support this property or method: 'ActiveDocument.SetClearAll'
I have commented 'ActiveDocument.SetClearAll'
ran there are no compile errors but it is not filtering the dates when i am accesing from app.
Please help me calling setclearall function from macro and filtering the dates..