Outlook E-Mail [message #1085797] |
Tue, 13 August 2013 11:38 |
Gian-Luca Zurolo 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,
"Outlook.Application");
}
}
Exception in thread "main" org.eclipse.swt.SWTException: Failed to create Ole Client. result = -2147221164
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:302)
at org.eclipse.swt.ole.win32.OleClientSite.<init>(OleClientSite.java:242)
at outlooktest.Main.main(Main.java:27)
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.02836 seconds