OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Opening Internet Explorer in one same window

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
bracho
General User
General User


Joined: 12 Dec 2008
Posts: 19

PostPosted: Mon Jun 29, 2009 2:03 pm    Post subject: Opening Internet Explorer in one same window Reply with quote

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
View user's profile Send private message
rebelxt
OOo Enthusiast
OOo Enthusiast


Joined: 10 Dec 2006
Posts: 114
Location: StLouis

PostPosted: Wed Jul 01, 2009 10:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group