| View previous topic :: View next topic |
| Author |
Message |
bracho General User

Joined: 12 Dec 2008 Posts: 19
|
Posted: Mon Jun 29, 2009 2:03 pm Post subject: Opening Internet Explorer in one same window |
|
|
I assigned the macro openIE to the event "OnCLick" of a hyperlink and want this macro to open in Internet Explorer an URL obtained from the view cursor.
I therefore use this code :
| Code: |
Sub openIE()
oObj = createUnoService( "com.sun.star.bridge.OleObjectFactory")
IE = oObj.createInstance("InternetExplorer.Application.1")
oDoc = ThisComponent
oText = oDoc.getText()
oCurseur = oDoc.CurrentController.ViewCursor()
vString = myUrl(oCurseur)
IE.Visible = True
IE.Navigate(vString)
End Sub
|
It works fine, but each time I click on a hyperlink, a new window gets opened.
I tried to avoid that by two means :
- declaring IE as global and create it at the opening of the document (and then test if it still exists inside the macro),
- use the parameters of the navigate method to pass a window name.
In vain...
Vould someone help me to get these url opened in the same window (an in the same tab) ?
Manu thanks in advance. |
|
| Back to top |
|
 |
rebelxt OOo Enthusiast


Joined: 10 Dec 2006 Posts: 114 Location: StLouis
|
Posted: Wed Jul 01, 2009 10:31 am Post subject: |
|
|
| You may be encountering a limitation of IE. What version are you using? Can you try Firefox and/or Opera and/or Chrome and/or anything else? Even if you are required to use IE, using another browser may show where the restriction lies. |
|
| Back to top |
|
 |
|