Stephan,
I tried running this code, but got a
"com.sun.star.lang.ServiceNotRegisteredException". I can't find any
references to com.sun.star.textfield.URL online. Is that the correct path?
Thanks,
Ann
===
The shades of confusion start to lift ;-)
"HyperLinkURL" is a optional CharacterProperty which isn't avalable at
the text of a shape.
What the "insert-Hyperlink" does is inserting a textfield ... something
like
----------------
Object o = xFactory.createInstance("com.sun.star.textfield.URL");
XTextContent xTC = (XTextContent)
UnoRuntime.queryInterface(XTextContent.class, o);
XPropertySet xPS = (XPropertySet)
UnoRuntime.queryInterface(XPropertySet.class, o);
xPS.setPropertyValue("URL","http://www.openoffice.org");
xText.insertTextContent(xTextCursor, xTC, false);
----------------
should do the trick.
Hope that helps
Regards
Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]