| View previous topic :: View next topic |
| Author |
Message |
OOcorreio Newbie

Joined: 22 May 2012 Posts: 2
|
Posted: Tue May 22, 2012 9:46 am Post subject: [Solved] Open a document in same window |
|
|
Hello,
I am using vbscript for automate Openoffice 3.0 in Windows XP SP3
I want to open an document (Test2.ods) in the _same_ window of another document (Test1.ods)
Something like ...
Set oServiceManager = WScript.CreateObject("com.sun.star.ServiceManager")
Set oDesktop = oServiceManager.createInstance("com.sun.star.frame.Desktop")
fileURL = convertToURL("c:\Test1.ods")
Set oDoc = oDesktop.loadComponentFromURL(fileURL, "_blank", 0, Array())
Set ot1 = oDoc.getCurrentController
Set ot2 = ot1.getFrame
Set oWin = ot2.getContainerWindow
Is there are an method such as:
fileURL2 = convertToURL("c:\Test2.ods")
oWin.loadInThisWindow(fileURL2)
loadInThisWindow() is pure fiction..
Thanks in advance..
PD: sorry for my poor english..
Last edited by OOcorreio on Wed May 23, 2012 11:26 am; edited 1 time in total |
|
| Back to top |
|
 |
patel Power User

Joined: 14 Apr 2012 Posts: 54 Location: Italy
|
Posted: Wed May 23, 2012 4:45 am Post subject: |
|
|
Are you able to open 2 documents in same window manually ? _________________ If your problem has been solved please add "[Solved]" to the beginning of your first post title (edit button). |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
OOcorreio Newbie

Joined: 22 May 2012 Posts: 2
|
|
| Back to top |
|
 |
|