Hyperlinks for url and mail in openoffice
===

I have a weard problem in my code. I have a methode to create a hyperlink. When I call this method in the first method used, the link shows good. When I use it at the method I want to use it just makes the entire page an hyperlink..

This is the code:

    def insertHyperlink(naam, url):
    	txt.insertString(cur, naam, False)
    	cur.gotoStart(False)
    	cur.gotoEnd(True)
    	cur.HyperLinkURL = url

The problems are:

- It only works at the start of the document
- If i dont use gotoEnd the link also doesn't work. Since I need 2 hyperlinks i can't use gotoEnd()..

Final looks are:

Website: hyperlink site

E-mail: mailto hyperlink

i got working links, but only the 2 problems are what needs to be fixed. I can't seem to find the solution on the internet, so i hope somebody here knows the fix...


Best regards!