Run an ms word vba macro before a specific time
In ms word, I have a VBA macro that runs each time I start Word. But I would like it to run only the first time I start my computer in the morning, not every time during the day. I have discovered the function of
Application.OnTime TimeValue("xxxx"),
But I would like it to run only before 11 am, and not after that. Or, on the first startup of Word
and not after that. I think I need to use a variable for the time value,
But I am not sure how that would work.
Any ideas?
|