|
Re: OLE Outlook [message #449799 is a reply to message #449590] |
Sat, 29 January 2005 22:05 |
Eclipse User |
|
|
|
Originally posted by: gilblais.yahoo.com
Kalman - Why not open Outlook yourself if you get an exception?
"Kalman" <kalman@zikal.com> wrote in message
news:ct8rt6$q1r$1@www.eclipse.org...
>I am trying to talk to Microsoft Outlook from SWT. (What I really need to
>do
> is access the AddressBook.) I was able to embed a Word document into my
> application, but when I use the same technique for Outlook - it fails.
>
> The code below:
>
> OleFrame frame = new OleFrame (shell, SWT.NONE);
> OleControlSite site = new OleControlSite (frame, SWT.NONE,
> "Outlook.Application");
> site.doVerb (OLE.OLEIVERB_UIACTIVATE);
> OleAutomation outlook = new OleAutomation(site);
>
> only works when Outlook is already open. If Outlook is not open - I get
> the
> following EXCEPTION:
>
> Exception in thread "main" java.lang.NullPointerException
> at org.eclipse.swt.ole.win32.OleAutomation.<init>(OleAutomation.java:114)
> at Outlook.main(Outlook.java:29)
>
>
> Any ideas on how to avoid this? (It's a weird requirement to have the
> customer open Outlook before running the program.)
>
> Thanx,
> - Kalman
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.02342 seconds