Outlook 2000: Aufgabe versenden mit SWT

Hallo,
ich habe ein dringendes Problem:
Über meine Java-Applikation (mithilfe von SWT) sollen in Outlook Aufgaben erstellt UND versendet werden! Das erstellen und speichern der Aufgaben funktioniert, aber leider schaffe ich es nicht diese auch zu versenden Alle Properties werden erfolgreich gespeichert, aber wenn ich mir die aus Java generierte Aufgabe in meinem Outlook Postfach anschaue, ist das „An:“ -Feld immer leer und die Aufgabe wird nicht versendet… Das Versenden einfacher Mails klappt übrigens.

Das Problem muss irgendwie beim setzen des Recipients-Properties liegen… im Beispiel unten versuche ich es mit einem Variant-Array… in anderen Versuchen mit einem einfachen Variant-Objekt funktionierte es auch nicht.

hier der Code:

public void swtTest() {

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“ );
OleAutomation auto = new OleAutomation( site );
int[] GetNamespaceDispId = auto.getIDsOfNames( new String[] { „GetNamespace“ } );
Variant Namespace = auto.invoke(GetNamespaceDispId[0], new Variant[] { new Variant( „MAPI“ ) } );
OleAutomation NamespaceAutomation = Namespace.getAutomation();
int[] LogonDispId = NamespaceAutomation.getIDsOfNames( new String[] { „Logon“ } );
NamespaceAutomation.invoke(LogonDispId[0], new Variant[] { new Variant( „[email protected]“ ),
new Variant( „XXX“ ),
new Variant( true ),
new Variant( true ) });

int[] createItemDispId = auto.getIDsOfNames( new String[] { „CreateItem“ } );
Variant task = auto.invoke( createItemDispId[0], new Variant[] { new Variant( JConstant.OUTLOOK_TASK_ITEM ) } );
OleAutomation taskAutomation = task.getAutomation();

int[] delegatorPropertyDispId = taskAutomation.getIDsOfNames( new String[] { „Delegator“ } );
taskAutomation.setProperty( delegatorPropertyDispId[0], new Variant( „[email protected]“ ) );

int[] subjectPropertyDispId = taskAutomation.getIDsOfNames( new String[] { „Subject“ } );
taskAutomation.setProperty( subjectPropertyDispId[0], new Variant( „Dies ist der Betreff“ ) );

int[] BodyPropertyDispId = taskAutomation.getIDsOfNames( new String[] { „Body“ } );
taskAutomation.setProperty( BodyPropertyDispId[0], new Variant( „Hier steht der Inhalt der Aufgabe…“) );

int[] assignDispId = taskAutomation.getIDsOfNames( new String[] { „Assign“ } );
taskAutomation.invoke( assignDispId[0] );

int[] recipientsPropertyDispId = taskAutomation.getIDsOfNames( new String[] { „Recipients“ } );
taskAutomation.setProperty( recipientsPropertyDispId[0], new Variant[]{ new Variant( „[email protected]“ ) } );

int[] saveDispId = taskAutomation.getIDsOfNames( new String[] { „Save“ } );
taskAutomation.invoke( saveDispId[0] );

int[] sendDispId = taskAutomation.getIDsOfNames( new String[] { „Send“ } );
taskAutomation.invoke( sendDispId[0] );

int[] LogoffDispId = NamespaceAutomation.getIDsOfNames( new String[] { „Logoff“ } );
NamespaceAutomation.invoke( LogoffDispId[0] );
shell.dispose();
auto.dispose();
NamespaceAutomation.dispose();
taskAutomation.dispose();
site.deactivateInPlaceClient();
site.dispose();
frm.dispose();
}

hier die Office Outlook 2003 VBA Language Reference zum TaskItem Objekt:
http://msdn.microsoft.com/en-us/libr…ffice.11).aspx.aspx)
ich nutze zwar Outlook 2000 aber das sollte nicht das Problem sein…

Ich bin für jeden Hinweis der mir irgendwie weiterhelfen könnte überaus dankbar… ich verzweifle jetzt schon seit 2 Tagen an dem Problem :frowning:

hier die Office Outlook 2003 VBA Language Reference zum
TaskItem Objekt:
http://msdn.microsoft.com/en-us/libr…ffice.11).aspx.aspx)

lohnt hier nicht zu fragen, das forum ist leider kaputt, ich werd dann auf tutorial.de antworten.

wie ist das gemeint, dass das forum kaputt ist??

falls sie auf tutorials.de antworten möchten, hier der link: http://www.tutorials.de/forum/java/362770-outlook-20…

vielen dank!

wie ist das gemeint, dass das forum kaputt ist??

es gehen keine li tags auch wenns PREHTML getagt ist
und bei links hörht alles auf was mi Klammern anfängt, bringt also nichts hier was zu posten was nicht text ist :smile: und links auch nur mit risiko.

falls sie auf tutorials.de antworten möchten, hier der link:
http://www.tutorials.de/forum/java/362770-outlook-20…

vielen dank!