The error which is given:
procedure TForm1.btStartImportClick(Sender: TObject); var Calendar: MAPIFolder; NmSpace: NameSpace; begin try appOutlook.ConnectKind := ckRunningOrNew; appOutlook.Connect; try NmSpace := appOutlook.GetNamespace('MAPI'); NmSpace.Logon('', '', False, False); Calendar := NmSpace.GetDefaultFolder(olFolderCalendar); ProgressBar1.Max := Calendar.Items.Count; except On E: EOleException do // uses ComObj begin E.Message := FullOleExceptionMessage(E); ShowMessage(E.Message); Exit; end; end; finally appOutlook.Disconnect; end; end;
Cannot connect to MS Outlook server is unavailable Error code: -2147221231 80040111 Facility: ITF code: 4
Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.
”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.