Stef Merlijn
asked on
Delphi: Connect to running MS Outlook
Hi,
Following code I use to connect with MS Outlook.
When trying to connect to a running instance of Outlook I get an EOleSysError:
NL: Uitvoeren vanaf de server is mislukt, ProgID: "outlook.application".
US: Server execution failed, ProgID: "outlook.application". Ā << translated
Following code I use to connect with MS Outlook.
When trying to connect to a running instance of Outlook I get an EOleSysError:
NL: Uitvoeren vanaf de server is mislukt, ProgID: "outlook.application".
US: Server execution failed, ProgID: "outlook.application". Ā << translated
try
Outlook := GetActiveOleObject('outlook.application'); << ERROR
Result := True;
except
Outlook := CreateOleObject('outlook.application'); << THIS WORKS
Result := True;
end;
Any ideas how to solve this?
ASKER
@extermie:
Your code is the same as mine, so that isn't the problem.
The similar case you mentioned has a solution in case Outlook is still running in the background (in stead of being closed), but it doesn't solve the problem to connect to a running instance.
Your code is the same as mine, so that isn't the problem.
The similar case you mentioned has a solution in case Outlook is still running in the background (in stead of being closed), but it doesn't solve the problem to connect to a running instance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks!
Your suggestion also pointed met to RapWare, which doesn't need a connection to Outlook itself.
Your suggestion also pointed met to RapWare, which doesn't need a connection to Outlook itself.
multiple instances of Outlook aren't allowed
Open in new window
Also a similar case on EE
https://www.experts-exchange.com/questions/28933412/Can't-connect-to-Outlook-via-TOutlookApplication-component.html