Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).
Sub toggleScheduledSendReceive() ' this only works in Outlook 2010 and earlier ' the Line1 code must run BEFORE the Line2 .execute command ' if Line1 comes after the .execute it will randomly return the control's PREVIOUS value rather than the TOGGLED value. ' this because the .execute runs asynchrously. ' Vba starts the .execute, then resumes at line2B ' even though the toggle may or may not have finished. On Error GoTo err_routine Dim x Dim OutlookSendReceiveWasPreviouslyDisabled As Boolean Line1: OutlookSendReceiveWasPreviouslyDisabled = Application.ActiveExplorer().CommandBars("Standard").Controls("Send/Re&ceive").Controls("Send/Recei&ve Settings").Controls("&Disable Scheduled Send/Receive").State Line2: Application.ActiveExplorer().CommandBars("Standard").Controls("Send/Re&ceive").Controls("Send/Recei&ve Settings").Controls("&Disable Scheduled Send/Receive").Execute Line2b: If OutlookSendReceiveWasPreviouslyDisabled Then MsgBox "Send/Receive schedule has been Enabled." Else msgBox "Send/Receive and Server Import schedules have been Disabled" End If exit_sub: Exit Sub err_routine: msgBox Error$ Resume exit_sub
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!