Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Outlook E-Mail(Create and View an Outlook E-Mail)
Outlook E-Mail [message #1085797] Tue, 13 August 2013 11:38 Go to next message
Gian-Luca Zurolo is currently offline Gian-Luca ZuroloFriend
Messages: 1
Registered: August 2013
Junior Member
Hi there,

I'm searching the web for days now, without finding a solution.

I want to create an E-Mail for Outlook (2013) and set it up (body, subject, etc)
This E-Mail should then get visible for the user, so he can click send manually.

I have x64 (java, os and swt 4.3 downloaded from eclipse)

But i can't get this code to work:
public class Main {

   public static void main(String[] args) {
	   Display display = new Display();
	   Shell shell = new Shell(display);

	   shell.setText("Outlook Automation");
	   shell.setLayout(new FillLayout());

	   OleFrame frm = new OleFrame(shell, SWT.NONE);
		   OleClientSite site = new OleClientSite(frm, SWT.NONE,

Exception in thread "main" org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147221164
at org.eclipse.swt.ole.win32.OLE.error(
at org.eclipse.swt.ole.win32.OleClientSite.<init>(
at outlooktest.Main.main(

The error occurs when I want to create the OleClientSite. With Outlook.Application it doesn't work. With Excel.Sheet or Word.Document it works.

[Updated on: Tue, 13 August 2013 13:03]

Report message to a moderator

Re: Outlook E-Mail [message #1099372 is a reply to message #1085797] Sun, 01 September 2013 15:53 Go to previous message
Johan Schulz is currently offline Johan SchulzFriend
Messages: 20
Registered: November 2010
Junior Member

maybe this link can help you.
It seems you have to start outlook first before you can access it with OleClientSide.

Im not sure but i think you will need an 64bit Outlook instance if you use it with an 64bit SWt lib.

Previous Topic:Draw SWT widget on SWT canvas
Next Topic:Struggling to get SWT_AWT bridge working on Mac with Java 7
Goto Forum:

Current Time: Thu Jun 21 18:15:48 GMT 2018

Powered by FUDForum. Page generated in 0.01715 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top