Dirk-Uwe Batz schrieb:

Hi Leute,

Ich habe folgendes Problem ab OpenOffice.org Version 1.1.2 und höher,
bei der Version 1.1.5 tritt es nicht auf:

Ich öffne ein File (test.sxw) mit der LoadComponentFrom URL Funktion.
Das funktioniert ohne Probleme. In meinem File ist aber ein Makro integriert.
Diese Makro läßt sich nicht starten. Folgende Fehlermeldung entsteht:

Aus Sicherheitsgründen ist dieses Makro nicht aufführbar.
Für weitere Informationen überprüfen Sie die Sicherheitseinstellungen

Wenn ich das test.sxw direkt vom Desktop öffne gibt es mit dem Makro kein Problem.

Mein Makro:
Code:
Sub Main
Macro1
End Sub

Sub Macro1
msgbox ("Hallo, Nipfnapf.....",36)
End Sub


Geöffnet wird das File über:

Code:

PropertyValue[] loadProps = new PropertyValue[2];

loadProps[0] = new PropertyValue();
loadProps[0].Name = "AsTemplate";
loadProps[0].Value = new Boolean(false);
loadProps[1] = new PropertyValue();
loadProps[1].Name = "MacroExecutionMode";

folgende Zeile:

loadProps[1].Value = "ALWAYS_EXECUTE_NO_WARN";

muß lauten:
loadProps[1].Value = new Short(com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN);


      // load
return xComponentLoader.loadComponentFromURL(loadUrl, "_blank", 0, loadProps);


Die 2. Property hatte ich auch schon mal entfernt, aber immer das gleiche Ergebniß.

Gruß
Dirk-Uwe



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--

[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.nstgmbh.com <http://www.nstgmbh.com/>
NST GmbH
Rheinstr. 7 Haus 2.3
D-41836 Hückelhoven
Germany
Tel:    +49 (2433) 970 350
Fax:   +49 (2433) 970 351



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Antwort per Email an