ted.martin
Registered User.
- Local time
- Today, 12:16
- Joined
- Sep 24, 2004
- Messages
- 743
I have found this code that works fine in Outlook 2010 but in Outlook 2016 it gives me an error 91 (variable not found) on the .Execute line
Am I missing something? - Thanks
Am I missing something? - Thanks
Code:
.
Dim nmsName As Outlook.Namespace
Set nmsName = Outlook.Session
If nmsName.Offline = False Then
If MsgBox("Do you wish to Set Outlook to OFFLINE as invoices are about to be prepared for eMail", vbYesNo + vbQuestion + vbDefaultButton2, "Outlook OFFLINE?") = vbYes Then
Outlook.ActiveExplorer().CommandBars.FindControl(, 5613).Execute
DoEvents
End If
End If
Set nmsName = Nothing